Vertex.cpp
71 , state_(spaceInformation->allocState()) // The memory allocated here is freed in the destructor.
143 // See https://stackoverflow.com/questions/45507041/how-to-check-if-weak-ptr-is-empty-non-assigned.
239 void Vertex::setForwardParent(const std::shared_ptr<Vertex> &vertex, const ompl::base::Cost &edgeCost)
444 std::function<bool(const std::pair<std::array<ompl::base::Cost, 2u>, std::shared_ptr<Vertex>> &,
454 std::function<bool(const std::pair<std::array<ompl::base::Cost, 2u>, std::shared_ptr<Vertex>> &,
473 aitstar::Edge, std::function<bool(const aitstar::Edge &, const aitstar::Edge &)>>::Element *pointer)
480 aitstar::Edge, std::function<bool(const aitstar::Edge &, const aitstar::Edge &)>>::Element *pointer)
This class provides an implementation of an updatable min-heap. Using it is a bit cumbersome,...
Definition: BinaryHeap.h:53
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:48
A shared pointer wrapper for ompl::base::ProblemDefinition.
A shared pointer wrapper for ompl::base::SpaceInformation.
Definition: Edge.h:56
std::vector< std::shared_ptr< Vertex > > getReverseChildren() const
Returns this vertex's children in the reverse search tree.
Definition: Vertex.cpp:393
std::vector< std::weak_ptr< aitstar::Vertex > > invalidateForwardBranch()
Recursively invalidates the branch of the forward tree rooted in this vertex.
Definition: Vertex.cpp:221
ompl::base::State * getState()
Provides write access to the underlying state.
Definition: Vertex.cpp:93
std::vector< ompl::BinaryHeap< aitstar::Edge, std::function< bool(const aitstar::Edge &, const aitstar::Edge &)> >::Element * > getForwardQueueIncomingLookup() const
Returns the forward queue incoming lookup of this vertex.
Definition: Vertex.cpp:487
bool isWhitelistedAsChild(const std::shared_ptr< Vertex > &vertex) const
Returns whether a child is whitelisted.
Definition: Vertex.cpp:332
void blacklistAsChild(const std::shared_ptr< Vertex > &vertex) const
Blacklists a child.
Definition: Vertex.cpp:344
ompl::base::Cost getExpandedCostToComeFromGoal() const
Returns the cost to come to this vertex from the goal when it was expanded.
Definition: Vertex.cpp:122
void resetForwardQueueOutgoingLookup()
Resets the forward queue outgoing lookup.
Definition: Vertex.cpp:520
void registerPoppedOutgoingEdgeDuringForwardSearch()
Registers that a child has been added to this vertex during the current forward search.
Definition: Vertex.cpp:405
bool hasHadOutgoingEdgePoppedDuringCurrentForwardSearch() const
Returns whether the vertex has had an outgoing edge popped during the current forward search.
Definition: Vertex.cpp:426
const std::vector< std::shared_ptr< Vertex > > & getNeighbors() const
Returns the nearest neighbors, throws if not up to date.
Definition: Vertex.cpp:372
void removeFromForwardChildren(std::size_t vertexId)
Removes a vertex from this vertex's forward children.
Definition: Vertex.cpp:284
bool hasCachedNeighbors() const
Returns whether the vertex knows its nearest neighbors on the current approximation.
Definition: Vertex.cpp:361
bool hasBeenExpandedDuringCurrentReverseSearch() const
Returns whether the vertex has been expanded during the current reverse search.
Definition: Vertex.cpp:431
void setReverseQueuePointer(typename ompl::BinaryHeap< std::pair< std::array< ompl::base::Cost, 2u >, std::shared_ptr< Vertex >>, std::function< bool(const std::pair< std::array< ompl::base::Cost, 2u >, std::shared_ptr< Vertex >> &, const std::pair< std::array< ompl::base::Cost, 2u >, std::shared_ptr< Vertex >> &)>>::Element *pointer)
Sets the reverse queue pointer of this vertex.
Definition: Vertex.cpp:441
std::vector< ompl::BinaryHeap< aitstar::Edge, std::function< bool(const aitstar::Edge &, const aitstar::Edge &)> >::Element * > getForwardQueueOutgoingLookup() const
Returns the forward queue outgoing lookup of this vertex.
Definition: Vertex.cpp:494
void setForwardParent(const std::shared_ptr< Vertex > &vertex, const ompl::base::Cost &edgeCost)
Sets the parent vertex (in the forward-search tree).
Definition: Vertex.cpp:239
ompl::BinaryHeap< std::pair< std::array< ompl::base::Cost, 2u >, std::shared_ptr< Vertex > >, std::function< bool(const std::pair< std::array< ompl::base::Cost, 2u >, std::shared_ptr< Vertex >> &, const std::pair< std::array< ompl::base::Cost, 2u >, std::shared_ptr< Vertex >> &)> >::Element * getReverseQueuePointer() const
Returns the reverse queue pointer of this vertex.
void setCostToComeFromGoal(const ompl::base::Cost &cost)
Sets the cost to come to this vertex from the goal.
Definition: Vertex.cpp:174
ompl::base::Cost getCostToComeFromStart() const
Returns the cost to come to this vertex from the start.
Definition: Vertex.cpp:108
void addToReverseChildren(const std::shared_ptr< Vertex > &vertex)
Adds a vertex this vertex's children.
Definition: Vertex.cpp:303
ompl::base::Cost getCostToComeFromGoal() const
Returns the cost to come to this vertex from the goal.
Definition: Vertex.cpp:113
ompl::base::ScopedState getScopedState() const
Returns a scoped copy of the underlying state.
Definition: Vertex.cpp:103
void setExpandedCostToComeFromGoal(const ompl::base::Cost &cost)
Sets the cost to come to this vertex from the goal when it was expanded.
Definition: Vertex.cpp:180
bool hasForwardParent() const
Returns whether this vertex has a parent in the forward search.
Definition: Vertex.cpp:141
bool isBlacklistedAsChild(const std::shared_ptr< Vertex > &vertex) const
Returns whether a child is blacklisted.
Definition: Vertex.cpp:349
void resetForwardQueueIncomingLookup()
Resets the forward queue incoming lookup.
Definition: Vertex.cpp:515
void addToForwardChildren(const std::shared_ptr< Vertex > &vertex)
Adds a vertex to this vertex's forward children.
Definition: Vertex.cpp:279
void updateCostOfForwardBranch() const
Updates the cost to the whole branch rooted at this vertex.
Definition: Vertex.cpp:190
void setForwardEdgeCost(const ompl::base::Cost &cost)
Sets the cost to come to this vertex.
Definition: Vertex.cpp:164
void removeFromForwardQueueOutgoingLookup(ompl::BinaryHeap< aitstar::Edge, std::function< bool(const aitstar::Edge &, const aitstar::Edge &)>>::Element *element)
Remove an element from the outgoing queue lookup.
Definition: Vertex.cpp:507
ompl::base::Cost getCostToGoToGoal() const
Returns the cost to go heuristic from this vertex.
Definition: Vertex.cpp:131
void setReverseParent(const std::shared_ptr< Vertex > &vertex)
Sets the parent vertex (in the reverse-search tree).
Definition: Vertex.cpp:262
void unregisterExpansionDuringReverseSearch()
Unregisters the expansion of this vertex during the current reverse search, needed when a reverse bra...
Definition: Vertex.cpp:416
void removeFromReverseChildren(std::size_t vertexId)
Removes a vertex from this vertex's forward children.
Definition: Vertex.cpp:308
void addToForwardQueueOutgoingLookup(typename ompl::BinaryHeap< aitstar::Edge, std::function< bool(const aitstar::Edge &, const aitstar::Edge &)>>::Element *pointer)
Adds an element to the forward queue outgoing lookup.
Definition: Vertex.cpp:478
void whitelistAsChild(const std::shared_ptr< Vertex > &vertex) const
Whitelists a child.
Definition: Vertex.cpp:327
bool hasReverseParent() const
Returns whether this vertex has a parent in the reverse search.
Definition: Vertex.cpp:154
void registerExpansionDuringReverseSearch()
Registers the expansion of this vertex during the current reverse search.
Definition: Vertex.cpp:410
void removeFromForwardQueueIncomingLookup(ompl::BinaryHeap< aitstar::Edge, std::function< bool(const aitstar::Edge &, const aitstar::Edge &)>>::Element *element)
Remove an element from the incoming queue lookup.
Definition: Vertex.cpp:499
std::vector< std::weak_ptr< aitstar::Vertex > > invalidateReverseBranch()
Recursively invalidates the branch of the reverse tree rooted in this vertex.
Definition: Vertex.cpp:201
void setCostToComeFromStart(const ompl::base::Cost &cost)
Sets the cost to come to this vertex.
Definition: Vertex.cpp:169
void setCostToGoToGoal(const ompl::base::Cost &cost)
Sets the cost to go heuristic of this vertex.
Definition: Vertex.cpp:185
std::shared_ptr< Vertex > getForwardParent() const
Returns the parent of the vertex (in the forward-search tree).
Definition: Vertex.cpp:149
ompl::base::Cost getEdgeCostFromForwardParent() const
Returns the edge cost from the forward parent.
Definition: Vertex.cpp:136
void registerInsertionIntoQueueDuringReverseSearch()
Registers the insertion of this vertex into the open queue during the current reverse search.
Definition: Vertex.cpp:421
std::vector< std::shared_ptr< Vertex > > getForwardChildren() const
Returns this vertex's children in the forward search tree.
Definition: Vertex.cpp:382
void cacheNeighbors(const std::vector< std::shared_ptr< Vertex >> &neighbors) const
Caches the neighbors for the current approximation.
Definition: Vertex.cpp:366
void addToForwardQueueIncomingLookup(typename ompl::BinaryHeap< aitstar::Edge, std::function< bool(const aitstar::Edge &, const aitstar::Edge &)>>::Element *pointer)
Adds an element to the forward queue incoming lookup.
Definition: Vertex.cpp:471
std::shared_ptr< Vertex > getReverseParent() const
Returns the parent of the vertex (in the reverse-search tree).
Definition: Vertex.cpp:159
bool hasBeenInsertedIntoQueueDuringCurrentReverseSearch() const
Returns whether the vertex has been inserted into the queue during the current reverse search.
Definition: Vertex.cpp:436
Main namespace. Contains everything in this library.
Definition: ConstrainedSpaceInformation.h:53