SearchQueue.cpp
150 for (auto it = child->edgeQueueInLookupConstBegin(); it != child->edgeQueueInLookupConstEnd(); ++it)
159 if (updateEdge) // The edge is already in the queue, we need to update it's sort key (presumably because
270 // Iterate over the vector of incoming edges to this vertex and remove them from the queue (and clean up
272 for (auto it = vertex->edgeQueueInLookupConstBegin(); it != vertex->edgeQueueInLookupConstEnd(); ++it)
274 // Remove the edge from the *other* lookup (by value since this is NOT an iter to THAT container).
294 // Iterate over the vector of outgoing edges to this vertex and remove them from the queue (and clean up
296 for (auto it = vertex->edgeQueueOutLookupConstBegin(); it != vertex->edgeQueueOutLookupConstEnd(); ++it)
298 // Remove the edge from the *other* lookup (by value since this is NOT an iter to THAT container).
349 for (auto it = graphPtr_->startVerticesBeginConst(); it != graphPtr_->startVerticesEndConst(); ++it)
392 return costHelpPtr_->isCostBetterThanOrEquivalentTo(costHelpPtr_->lowerBoundHeuristicVertex(state),
400 // Can it ever be a better solution? Less-than-equal to just in case we're using an edge that is exactly
403 bool canImprove = costHelpPtr_->isCostBetterThanOrEquivalentTo(costHelpPtr_->lowerBoundHeuristicEdge(edge),
406 // If the child is connected already, we need to check if we could do better than it's current connection.
410 // Can it ever be a better path to the vertex? Less-than-equal to just in case we're using an edge that
499 // access get the pointers to the elements because we stored them upon insertion. But it's a mess
513 // Update the sort keys of all outgoing edges of all vertices that have outgoing edges in the queue.
516 for (auto it = parent->edgeQueueOutLookupConstBegin(); it != parent->edgeQueueOutLookupConstEnd(); ++it)
522 // All edges have an updated key, let's rebuild the queue. Presumably this is more efficient than calling
554 void BITstar::SearchQueue::enqueueEdges(const VertexPtr &parent, const VertexPtrVector &possibleChildren)
611 // If the parent is expanded to a vertex in the tree, it is a rewiring. This needs to be registered.
618 void BITstar::SearchQueue::enqueueEdgeConditionally(const VertexPtr &parent, const VertexPtr &child)
638 BITstar::SearchQueue::SortKey BITstar::SearchQueue::createSortKey(const VertexPtrPair &edge) const
640 // The sort key of an edge (u, v) is [ g_t(u) + c^hat(u, v) + epsilon_s * h^hat(v); g_t(u) + c^hat(u, v);
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
A helper class to handle the various heuristic functions in one place.
Definition: CostHelper.h:133
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
std::vector< VertexPtr > VertexPtrVector
A vector of shared pointers to vertices.
Definition: BITstar.h:221
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
A conceptual representation of samples as an edge-implicit random geometric graph.
Definition: ImplicitGraph.h:120
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
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