SearchQueue.h
78 using EdgeComparisonFunction = std::function<bool(const SortKeyAndVertexPtrPair &, const SortKeyAndVertexPtrPair &)>;
std::function< bool(const SortKeyAndVertexPtrPair &, const SortKeyAndVertexPtrPair &)> EdgeComparisonFunction
The function signature of the sorting function for the Edge Queue.
Definition: SearchQueue.h:174
void insertOutgoingEdgesOfInconsistentVertices()
Insert the outgoing edges of all inconsistent vertices.
Definition: SearchQueue.cpp:473
SortKey getFrontEdgeValue()
Get the value of the best edge on the queue, leaving it at the front of the edge queue.
Definition: SearchQueue.cpp:203
void removeInEdgesConnectedToVertexFromQueue(const VertexPtr &vertex)
Erase all edges in the edge queue that lead to the given vertex.
Definition: SearchQueue.cpp:264
void clear()
Finish the queue if it is sorted, if not resort the queue. Finishing the queue clears all the edge co...
Definition: SearchQueue.cpp:333
unsigned int numEdgesPopped() const
The number of edges popped off the queue for processing (numEdgesPopped_).
Definition: SearchQueue.cpp:665
std::function< std::string()> NameFunc
A utility functor for ImplicitGraph and SearchQueue.
Definition: BITstar.h:245
VertexPtrPair popFrontEdge()
Pop the best edge off the queue, removing it from the front of the edge queue in the process.
Definition: SearchQueue.cpp:218
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:111
EdgeQueue::Element * EdgeQueueElemPtr
An element pointer into the edge queue binary heap.
Definition: SearchQueue.h:180
void getEdges(VertexConstPtrPairVector *edgeQueue)
Get a copy of the edge queue. This is expensive and is only meant for animations/debugging.
Definition: SearchQueue.cpp:434
std::pair< VertexPtr, VertexPtr > VertexPtrPair
A pair of vertices, i.e., an edge.
Definition: BITstar.h:230
std::shared_ptr< const unsigned int > getSearchId() const
Allow access to the current search id.
Definition: SearchQueue.cpp:371
bool canPossiblyImproveCurrentSolution(const VertexPtr &state) const
The condition used to insert vertices into the queue. Compares lowerBoundHeuristicVertex to the given...
Definition: SearchQueue.cpp:376
void removeOutEdgesConnectedToVertexFromQueue(const VertexPtr &vertex)
Erase all edges in the edge queue that leave from the given vertex.
Definition: SearchQueue.cpp:288
void enableCascadingRewirings(bool enable)
Set whether cascading of rewirings is enabled.
Definition: SearchQueue.cpp:135
void rebuildEdgeQueue()
Update all the sort keys of the edges in the queue and resort.
Definition: SearchQueue.cpp:494
std::pair< SortKey, VertexPtrPair > SortKeyAndVertexPtrPair
The data stored in the edge-queue binary heap.
Definition: SearchQueue.h:171
bool isEmpty()
Returns true if the queue is empty. In the case where the edge queue is empty but the vertex queue is...
Definition: SearchQueue.cpp:427
ompl::BinaryHeap< SortKeyAndVertexPtrPair, EdgeComparisonFunction > EdgeQueue
The underlying edge queue. Using static keys for the same reason as the Vertex Queue.
Definition: SearchQueue.h:177
std::vector< VertexPtr > VertexPtrVector
A vector of shared pointers to vertices.
Definition: BITstar.h:221
SearchQueue(NameFunc nameFunc)
Construct a search queue. It must be setup before use.
Definition: SearchQueue.cpp:79
void setInflationFactor(double factor)
Set the cost-to-go inflation factor.
Definition: SearchQueue.cpp:361
unsigned int numEdges()
Returns the number of edges in the queue. Will resort/expand the queue if necessary.
Definition: SearchQueue.cpp:420
std::array< ompl::base::Cost, 3u > SortKey
A triplet of costs, i.e., the edge queue sorting key.
Definition: SearchQueue.h:168
void registerSolutionCost(const ompl::base::Cost &solutionCost)
Mark that a solution has been found.
Definition: SearchQueue.cpp:253
double getInflationFactor() const
Get the cost-to-go inflation factor.
Definition: SearchQueue.cpp:366
virtual ~SearchQueue()=default
Destruct the search queue using the default deconstructor.
std::vector< VertexConstPtrPair > VertexConstPtrPairVector
A vector of pairs of const vertices, i.e., a vector of edges.
Definition: BITstar.h:239
void addToInconsistentSet(const VertexPtr &vertex)
Add a vertex to the set of inconsistent vertices.
Definition: SearchQueue.cpp:538
VertexPtrPair getFrontEdge()
Get the best edge on the queue, leaving it at the front of the edge queue.
Definition: SearchQueue.cpp:188
void setup(CostHelper *costHelpPtr, ImplicitGraph *graphPtr)
Setup the SearchQueue, must be called before use.
Definition: SearchQueue.cpp:88
void removeAllEdgesConnectedToVertexFromQueue(const VertexPtr &vertex)
Erase all edges in the edge queue that are connected to the given vertex.
Definition: SearchQueue.cpp:312
void insertOutgoingEdges(const VertexPtr &vertex)
Update the edge queue by adding all the potential edges from the vertex to nearby states.
Definition: SearchQueue.cpp:452
std::vector< EdgeQueueElemPtr > EdgeQueueElemPtrVector
A vector of edge queue pointers.
Definition: SearchQueue.h:183
void removeFromInconsistentSet(const VertexPtr &vertex)
Remove a vertex from the set of inconsistent vertices.
Definition: SearchQueue.cpp:318
void update(const EdgeQueueElemPtr elementPtr)
Update the sort key of a particular edge and its position in the queue.
Definition: SearchQueue.cpp:527
Main namespace. Contains everything in this library.
Definition: MultiLevelPlanarManipulatorDemo.cpp:65
void insertOutgoingEdgesOfStartVertices()
Insert the outgoing edges of all start vertices.
Definition: SearchQueue.cpp:344