HOG2
Functions | Variables
FPUtil.h File Reference
#include "float.h"
#include <limits>
Include dependency graph for FPUtil.h:

Go to the source code of this file.

Functions

bool fless (double a, double b)
 
bool fgreater (double a, double b)
 
bool flesseq (double a, double b)
 
bool fgreatereq (double a, double b)
 
bool fequal (double a, double b, double tolerance=TOLERANCE)
 
double min (double a, double b)
 
double max (double a, double b)
 

Variables

static const double TOLERANCE = 0.000001
 

Function Documentation

◆ fequal()

bool fequal ( double  a,
double  b,
double  tolerance = TOLERANCE 
)
inline

Definition at line 32 of file FPUtil.h.

Referenced by aStarOld::aStarOld(), HeuristicLearningMeasure< state, action, environment >::ComputeRequiredLearning(), GraphDistanceHeuristic::ComputeSizes(), line2d::crosses(), IBEX::IBEX< state, action, environment, DFS >::DFBNBHelper(), SFIDAStar< state, action >::DoIteration(), IDAStar< state, action, verbose >::DoIteration(), LearningUnit< state, action, environment >::Done(), IRDijkstra::DoOneSearchStep(), IRAStar::DoOneSearchStep(), IncrementalBGS< state, action >::DoSingleSearchStep(), IncrementalBTS< state, action >::DoSingleSearchStep(), fMM< state, action, environment, priorityQueue >::DoSingleSearchStep(), OptimisticSearch< state, action, environment >::DoSingleSearchStep(), PEAStar< state, action, environment >::DoSingleSearchStep(), MapOverlay::Draw(), SnakeBird::SnakeBird::Draw(), BOAStar< state, action, environment >::DrawFrontier(), FLRTA::FLRTAStar< state, action, environment >::ExtractBestPath(), GraphDistanceHeuristic::FindBestChild(), OpenListB< PropUtil::SearchNode, PropUtil::SearchNodeHash, PropUtil::SearchNodeEqual, PropUtil::GGreater, PropUtil::GGreater, PropUtil::FExtract >::FindTieFMin(), Directional2DEnvironment::GCost(), Directional2DEnvironment::GetAction(), BOAStar< state, action, environment >::GetBestStateOnOpen(), NBS< state, action, environment, dataStructure, priorityQueue >::GetMeetingPoint(), DFID< state, action >::GetPath(), LRTAStar< state, action, environment >::GetPath(), MPLRTA::MPLRTAStar::GetPath(), IBEX::IBEX< state, action, environment, DFS >::GetPath(), LSSLRTAStar< state, action, environment >::GetPath(), gLSSLRTAStar< state, action, environment >::GetPath(), IRDijkstra::GetSolution(), IRAStar::GetSolution(), ConfigEnvironment::GoalTest(), FLRTA::FLRTAStar< state, action, environment >::IsBestParent(), MyRandomUnitKeyHandler(), FLRTA::FLRTAStar< state, action, environment >::NumParents(), MapOverlay::OpenGLDraw(), NBSCompareOpenReady< state, DS >::operator()(), MMCompare< state, epsilon >::operator()(), GBFSCompare< state >::operator()(), NBSCompareOpenWaiting< state, DS >::operator()(), fMMCompare< state, epsilon >::operator()(), IOSCompare< state >::operator()(), OptimisticCompare< state >::operator()(), AStarCompareWithF< state >::operator()(), CFOptimalRefinementConstants::NodeCompare::operator()(), AStar3Util::SearchNodeCompare::operator()(), GenericAStarUtil::SearchNodeCompare::operator()(), PEAStarCompare< state >::operator()(), IndexCompare< state >::operator()(), AStarCompare< state >::operator()(), MeroBUtil::SearchNodeCompare::operator()(), EPEAStarCompare< state >::operator()(), IndexCompareWithF< state >::operator()(), AStarDelayUtil::SearchNodeCompare::operator()(), MeroBUtil::GGreater::operator()(), OldOldTemplateAStarUtil::SearchNodeCompare< state >::operator()(), AStarDelayUtil::GGreater::operator()(), PropUtil::SearchNodeCompare::operator()(), PropUtil::GGreater::operator()(), Focal< state, action, environment >::OpenTreapItem::operator<(), FocalAdd< state, action, environment >::OpenTreapItem::operator<(), Focal< state, action, environment >::FocalTreapItem::operator<(), FocalAdd< state, action, environment >::FocalTreapItem::operator<(), Graphics::point::operator==(), operator==(), FLRTA::FLRTAStar< state, action, environment >::PropagateGCosts(), MapOverlay::resetValues(), RoadMap::RoadMap(), MapOverlay::SVGDraw(), CFOptimalRefinement::UpdateOptH(), DWG::DynamicWeightedGrid< sectorSize >::ValidateEdges(), MapCliqueAbstraction::VerifyHierarchy(), and LoadedCliqueAbstraction::VerifyHierarchy().

◆ fgreater()

bool fgreater ( double  a,
double  b 
)
inline

Definition at line 29 of file FPUtil.h.

References TOLERANCE.

Referenced by FringeSearch::addCosts(), OldTemplateAStar< state, action, environment >::AddToOpenList(), IBEX::IBEX< state, action, environment, DFS >::BFHS(), AStarDelay::Broadcast(), Prop::Broadcast(), HeuristicLearningMeasure< state, action, environment >::ComputeConsistencyLearning(), CanonicalGraphEnvironment::ComputeOrdering(), line2d::crosses(), IBEX::IBEX< state, action, environment, DFS >::DFBNB(), EBSearch< state, action, environment, DFS >::DFBNBHelper(), IBEX::IBEX< state, action, environment, DFS >::DFBNBHelper(), GenericIDAStar::DoIteration(), SFIDAStar< state, action >::DoIteration(), DFID< state, action >::DoIteration(), IDAStarCR< state, action, buckets, verbose >::DoIteration(), EDAStar< state, action, verbose >::DoIteration(), IDAStar< state, action, verbose >::DoIteration(), ParallelIDAStar< environment, state, action >::DoIteration(), MM< state, action, environment, priorityQueue >::DoSingleSearchStep(), DynamicPotentialSearch< state, action, environment >::DoSingleSearchStep(), fMM< state, action, environment, priorityQueue >::DoSingleSearchStep(), PEAStar< state, action, environment >::DoSingleSearchStep(), DelayedHeuristicAStar< state, action, environment, batchHeuristic, openList >::DoSingleSearchStep(), TemplateAStar< state, action, environment >::DoSingleSearchStep(), OldTemplateAStar< state, action, environment >::DoSingleSearchStep(), AStarDelay::DoSingleSearchStep(), MeroB::DoSingleStepA(), Prop::DoSingleStepA(), Prop::DoSingleStepApprox(), MeroB::DoSingleStepB(), Prop::DoSingleStepB(), MeroB::DoSingleStepBP(), Prop::DoSingleStepBP(), Prop::DoSingleStepBPMX(), Prop::DoSingleStepDP(), Prop::DoSingleStepDPDLMX(), Prop::DoSingleStepDPMX(), MM< state, action, environment, priorityQueue >::Expand(), fMM< state, action, environment, priorityQueue >::Expand(), DVCBS< state, action, environment, dataStructure, priorityQueue >::Expand(), FLRTA::FLRTAStar< state, action, environment >::ExtractBestPath(), GraphMapInconsistentHeuristic::FillInCache(), GraphDistanceHeuristic::FindFarNode(), flesseq(), DelayedHeuristicAStar< state, action, environment, batchHeuristic, openList >::FullBPMX(), TemplateAStar< state, action, environment >::FullBPMX(), WeightedMap2DEnvironment::GCost(), IRDijkstra::GetAllSolutionNodes(), IRAStar::GetAllSolutionNodes(), NBSQueue< state, 1 >::GetNextPair(), GraphDistanceHeuristic::GetOptimalDistances(), FringeSearch::GetPath(), LRTAStar< state, action, environment >::GetPath(), MPLRTA::MPLRTAStar::GetPath(), IBEX::IBEX< state, action, environment, DFS >::GetPath(), DVCBSQueue< state >::getVertexCover(), MountainCarEnvironment::GoalTest(), AStarDelay::HandleNeighborX(), GraphDistanceHeuristic::HCost(), GraphPuzzleDistanceHeuristic< width, height >::HCost(), GraphMapInconsistentHeuristic::HCost(), Heap::HeapifyUp(), FLRTA::FLRTAStar< state, action, environment >::MarkDeadRedundant(), MyRandomUnitKeyHandler(), GenericPatrolUnit< state, action, environment >::OpenGLDraw(), MapOverlay::OpenGLDraw(), LearningUnit< state, action, environment >::OpenGLDraw(), GenericSearchUnit< state, action, environment >::OpenGLDraw(), OptimisticSearch< state, action, environment >::OpenGLDraw(), BDCompare< state >::operator()(), BFHSCompare< state >::operator()(), NBSCompareOpenReady< state, DS >::operator()(), MMCompare< state, epsilon >::operator()(), GBFSCompare< state >::operator()(), IBEX::BFHSCompare< state >::operator()(), NBSCompareOpenWaiting< state, DS >::operator()(), fMMCompare< state, epsilon >::operator()(), IOSCompare< state >::operator()(), OptimisticCompare< state >::operator()(), IRDijkstraConstants::NodeCompare::operator()(), AStarCompareWithF< state >::operator()(), CFOptimalRefinementConstants::NodeCompare::operator()(), GenericAStarUtil::SearchNodeCompare::operator()(), PEAStarCompare< state >::operator()(), AStar3Util::SearchNodeCompare::operator()(), IRAStarConstants::NodeCompare::operator()(), IndexCompare< state >::operator()(), AStarCompare< state >::operator()(), MeroBUtil::SearchNodeCompare::operator()(), FLRTA::dblCmp< state >::operator()(), EPEAStarCompare< state >::operator()(), IndexCompareWithF< state >::operator()(), AStarDelayUtil::SearchNodeCompare::operator()(), MeroBUtil::GGreater::operator()(), OldOldTemplateAStarUtil::SearchNodeCompare< state >::operator()(), AStarDelayUtil::GGreater::operator()(), PropUtil::SearchNodeCompare::operator()(), PropUtil::GGreater::operator()(), IncrementalBGS< state, action >::BFHSCompare::operator()(), FringeSearch::propagateGValues(), MapOverlay::resetValues(), Prop::ReversePropX2(), ParallelIDAStar< environment, state, action >::StartThreadedIteration(), IncrementalIDA< state, action >::StepIteration(), IncrementalBGS< state, action >::StepIteration(), IncrementalBTS< state, action >::StepIteration(), OldTemplateAStar< state, action, environment >::UpdateClosedNode(), AStarDelay::UpdateClosedNode(), FringeSearch::updateCosts(), CFOptimalRefinement::UpdateG(), CFOptimalRefinement::UpdateH(), Prop::UpdateHOnly(), GenericIDAStar::UpdateNextBound(), DFID< state, action >::UpdateNextBound(), SFIDAStar< state, action >::UpdateNextBound(), IDAStar< state, action, verbose >::UpdateNextBound(), ParallelIDAStar< environment, state, action >::UpdateNextBound(), aStar::updateWeight(), GenericAStar::UpdateWeight(), and OldTemplateAStar< state, action, environment >::UpdateWeight().

◆ fgreatereq()

bool fgreatereq ( double  a,
double  b 
)
inline

◆ fless()

bool fless ( double  a,
double  b 
)
inline

Definition at line 28 of file FPUtil.h.

References TOLERANCE.

Referenced by Focal< state, action, environment >::Add(), FocalAdd< state, action, environment >::Add(), AStarOpenClosed< state, IOSCompare< state >, IOSOpenClosedData< state > >::AddOpenNode(), EBSearch< state, action, environment, DFS >::BFHS(), IBEX::IBEX< state, action, environment, DFS >::BFHS(), BidirectionalProblemAnalyzer< state, action, environment >::BuildDataStructures(), Directional2DEnvironment::BuildHTable(), DALRTA::daLRTAStar< state, action, environment >::BuildLSSQ(), line2d::crosses(), EBSearch< state, action, environment, DFS >::DFBNBHelper(), IBEX::IBEX< state, action, environment, DFS >::DFBNBHelper(), Plotting::Line::DistanceToLine(), ImprovedOptimisticSearch< state, action, environment >::DoGreedyStep(), FLRTA::FLRTAStar< state, action, environment >::DoHCostLearning(), GenericIDAStar::DoIteration(), IDAStarCR< state, action, buckets, verbose >::DoIteration(), EDAStar< state, action, verbose >::DoIteration(), IDAStar< state, action, verbose >::DoIteration(), ImprovedOptimisticSearch< state, action, environment >::DoOptimalStep(), BIdijkstra< state, action, environment, priorityQueue >::DoSingleSearchStep(), MM< state, action, environment, priorityQueue >::DoSingleSearchStep(), Focal< state, action, environment >::DoSingleSearchStep(), FocalAdd< state, action, environment >::DoSingleSearchStep(), DynamicPotentialSearch< state, action, environment >::DoSingleSearchStep(), OptimisticSearch< state, action, environment >::DoSingleSearchStep(), fMM< state, action, environment, priorityQueue >::DoSingleSearchStep(), PEAStar< state, action, environment >::DoSingleSearchStep(), DelayedHeuristicAStar< state, action, environment, batchHeuristic, openList >::DoSingleSearchStep(), TemplateAStar< state, action, environment >::DoSingleSearchStep(), EPEAStar< state, action, environment >::DoSingleSearchStep(), AStarDelay::DoSingleSearchStep(), AStarDelay::DoSingleStep(), MeroB::DoSingleStepB(), Prop::DoSingleStepB(), MeroB::DoSingleStepBP(), Prop::DoSingleStepBP(), Prop::DoSingleStepBPMX(), Prop::DoSingleStepDP(), Prop::DoSingleStepDPDLMX(), Prop::DoSingleStepDPMX(), BIdijkstra< state, action, environment, priorityQueue >::Expand(), MM< state, action, environment, priorityQueue >::Expand(), NBS< state, action, environment, dataStructure, priorityQueue >::Expand(), fMM< state, action, environment, priorityQueue >::Expand(), DVCBS< state, action, environment, dataStructure, priorityQueue >::Expand(), NBS< state, action, environment, dataStructure, priorityQueue >::ExpandAPair(), DVCBS< state, action, environment, dataStructure, priorityQueue >::ExpandAVertexCover(), AStarEpsilon< state, action, environment >::ExpandFocal(), IRDijkstra::ExpandNeighbors(), IRAStar::ExpandNeighbors(), AStarEpsilon< state, action, environment >::ExpandOpen(), fgreatereq(), GraphDistanceHeuristic::FindAvoidNode(), GraphDistanceHeuristic::FindBestChild(), OpenListB< PropUtil::SearchNode, PropUtil::SearchNodeHash, PropUtil::SearchNodeEqual, PropUtil::GGreater, PropUtil::GGreater, PropUtil::FExtract >::FindSpecialMin(), DynamicPotentialSearch< state, action, environment >::GetBestFMin(), BOAStar< state, action, environment >::GetBestStateOnOpen(), BOAStar< state, action, environment >::GetClosestGoal(), MM< state, action, environment, priorityQueue >::GetNecessaryExpansions(), fMM< state, action, environment, priorityQueue >::GetNecessaryExpansions(), DelayedHeuristicAStar< state, action, environment, batchHeuristic, openList >::GetNecessaryExpansions(), TemplateAStar< state, action, environment >::GetNecessaryExpansions(), NBSQueue< state, 1 >::GetNextPair(), LRTAStar< state, action, environment >::GetPath(), MPLRTA::MPLRTAStar::GetPath(), HLRTA::HLRTAStar< state, action, environment >::GetPath(), LSSLRTAStar< state, action, environment >::GetPath(), gLSSLRTAStar< state, action, environment >::GetPath(), DVCBSQueue< state >::getVertexCover(), Heap::HeapifyDown(), IRAStar::Inconsistent(), DALRTA::daLRTAStar< state, action, environment >::LearnHeuristic(), max(), min(), MinimalSectorAbstraction::MoveRegionCenter(), MyRandomUnitKeyHandler(), Plotting::Plot2D::OffsetCurrMouse(), MapOverlay::OpenGLDraw(), NBSCompareOpenReady< state, DS >::operator()(), MMCompare< state, epsilon >::operator()(), GBFSCompare< state >::operator()(), IOSCompare< state >::operator()(), OptimisticCompare< state >::operator()(), AStarCompareWithF< state >::operator()(), GenericAStarUtil::SearchNodeCompare::operator()(), PEAStarCompare< state >::operator()(), AStar3Util::SearchNodeCompare::operator()(), IndexCompare< state >::operator()(), AStarCompare< state >::operator()(), MeroBUtil::SearchNodeCompare::operator()(), EPEAStarCompare< state >::operator()(), IndexCompareWithF< state >::operator()(), AStarDelayUtil::SearchNodeCompare::operator()(), OldOldTemplateAStarUtil::SearchNodeCompare< state >::operator()(), PropUtil::SearchNodeCompare::operator()(), Focal< state, action, environment >::OpenTreapItem::operator<(), FocalAdd< state, action, environment >::OpenTreapItem::operator<(), Focal< state, action, environment >::FocalTreapItem::operator<(), FocalAdd< state, action, environment >::FocalTreapItem::operator<(), LoadedBBAbstraction::BoundingBox::pointInBox(), FLRTA::FLRTAStar< state, action, environment >::PropagateGCosts(), FringeSearch::propagateHValues(), aStarOld::relaxEdge(), corridorAStar::relaxEdge(), praStar::relaxEdge(), corridorAStar::relaxFinalEdge(), corridorAStar::relaxFirstEdge(), MapOverlay::resetValues(), BidirectionalProblemAnalyzer< state, action, environment >::SaveSVG(), IncrementalIDA< state, action >::StepIteration(), IncrementalBGS< state, action >::StepIteration(), IncrementalBTS< state, action >::StepIteration(), BOAStar< state, action, environment >::stateInfo::Update(), AStarDelay::UpdateClosedNode(), AStarDelay::UpdateDelayedNode(), CFOptimalRefinement::UpdateG(), CFOptimalRefinement::UpdateH(), BilliardBallUnit::UpdateLocation(), GenericIDAStar::UpdateNextBound(), DFID< state, action >::UpdateNextBound(), SFIDAStar< state, action >::UpdateNextBound(), IDAStar< state, action, verbose >::UpdateNextBound(), ParallelIDAStar< environment, state, action >::UpdateNextBound(), and AStarDelay::UpdateOpenNode().

◆ flesseq()

bool flesseq ( double  a,
double  b 
)
inline

◆ max()

double max ( double  a,
double  b 
)
inline

Definition at line 36 of file FPUtil.h.

References fless().

◆ min()

double min ( double  a,
double  b 
)
inline

Definition at line 35 of file FPUtil.h.

References fless().

Referenced by Plotting::Plot2D::AddPoint(), AirplaneEnvironment::AirplaneEnvironment(), EBSearch< state, action, environment, DFS >::BFHS(), IBEX::IBEX< state, action, environment, DFS >::BFHS(), EBSearch< state, action, environment, DFS >::BinarySearch(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::BuildAdditivePDB(), BidirectionalProblemAnalyzer< state, action, environment >::BuildDataStructures(), Directional2DEnvironment::BuildHTable(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::BuildPDBBackward(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::BuildPDBForward(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::BuildPDBForwardBackward(), DVCBSQueue< state >::computeFullMinGTieBreaking(), DVCBSQueue< state >::computeMinGTieBreakingWithSub(), EBSearch< state, action, environment, DFS >::DFBNBHelper(), IBEX::IBEX< state, action, environment, DFS >::DFBNBHelper(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::DivCompress(), ParallelIDAStar< environment, state, action >::DoIteration(), Witness< width, height >::DoLine(), MM< state, action, environment, priorityQueue >::DoSingleSearchStep(), fMM< state, action, environment, priorityQueue >::DoSingleSearchStep(), TemplateAStar< state, action, environment >::DoSingleSearchStep(), MeroB::DoSingleStepBP(), Prop::DoSingleStepBP(), Prop::DoSingleStepBPMX(), Prop::DoSingleStepDP(), Prop::DoSingleStepDPDLMX(), Prop::DoSingleStepDPMX(), IBEX::IBEX< state, action, environment, DFS >::Dovetail(), Plotting::Point::Draw(), VoxelGrid::Draw(), BOAStar< state, action, environment >::DrawFrontier(), Voxels::Export(), FloydWarshall(), NBitArray< 8 >::Get(), RCPDB::GetCornerRotationHash(), RCPDB::GetCornerRotationSize(), Map2DHeading::GetCost(), IncrementalBGS< state, action >::GetCurrentFLimit(), IncrementalBTS< state, action >::GetCurrentFLimit(), NaryTree::GetDepthRadius(), GetEdgeHash(), RCPDB::GetEdgeRotationHash(), RCPDB::GetEdgeRotationSize(), VoxelGrid::GetImage(), NBSQueue< state, 1 >::GetNextPair(), FringeSearch::GetPath(), gLSSLRTAStar< state, action, environment >::GetPath(), RubikCornerPDB::GetPDBHash(), RubikEdgePDB::GetPDBHash(), RC::GetPDBHashCorner(), RCPDB::GetStateFromCornerRotationHash(), RCPDB::GetStateFromEdgeRotationHash(), RubikCornerPDB::GetStateFromPDBHash(), RubikEdgePDB::GetStateFromPDBHash(), RC::GetStateFromPDBHashCorner(), DVCBSQueue< state >::getVertexCover(), Map2DSectorAbstraction::HCost(), VoxelGrid::HCost(), Racetrack::HCost(), DiskBitFile::Init(), FocalAdd< state, action, environment >::InitializeSearch(), MinBloomFilter::Insert(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ModCompress(), Plotting::Plot2D::NormalizeAxes(), NaryTree::OpenGLDraw(), IBEX::IBEX< state, action, environment, DFS >::costInterval::operator&=(), IncrementalBGS< state, action >::costInterval::operator&=(), IncrementalBTS< state, action >::costInterval::operator&=(), CFOptimalRefinementConstants::NodeCompare::operator()(), Graphics::rect::operator|=(), Graph::printStats(), SnakeBird::SnakeBird::RemoveBlock(), VoxelGrid::SaveInMinBB(), NBitArray< 8 >::Set(), SnakeBird::SnakeBird::SetGroundType(), IncrementalBGS< state, action >::StepIteration(), IncrementalBTS< state, action >::StepIteration(), GraphEnvironment::SVGDraw(), Map::Trim(), BOAStar< state, action, environment >::stateInfo::Update(), FringeSearch::updateCosts(), and WidthToSVG().

Variable Documentation

◆ TOLERANCE

const double TOLERANCE = 0.000001
static

Definition at line 26 of file FPUtil.h.

Referenced by fgreater(), fless(), and DVCBSQueue< state >::getVertexCover().