ompl::geometric::BITstar::Vertex Class Reference

The vertex of the underlying graphs in gBITstar BIT*. More...

#include <ompl/geometric/planners/informedtrees/bitstar/Vertex.h>

Public Member Functions

 Vertex (ompl::base::SpaceInformationPtr spaceInformation, const CostHelper *const costHelpPtr, SearchQueue *const queuePtr, const std::shared_ptr< const unsigned int > &approximationId, bool root=false)
 Construct a vertex using space information, and helpers to compute various costs.
 
virtual ~Vertex ()
 Destruct a vertex.
 
BITstar::VertexId getId () const
 The (unique) vertex ID.
 
ompl::base::Statestate ()
 The state of a vertex as a pointer.
 
const ompl::base::Statestate () const
 The state of a vertex as a pointer to const.
 
bool isRoot () const
 Returns whether the vertex is the root of the search tree.
 
bool hasParent () const
 Returns whether this vertex has a parent.
 
bool isInTree () const
 Get whether a vertex is in the search tree or a sample (i.e., a vertex of the RRG).
 
unsigned int getDepth () const
 Get the depth of the vertex from the root.
 
VertexConstPtr getParent () const
 Get a const pointer to the parent of this vertex.
 
VertexPtr getParent ()
 Get a pointer to the parent of this vertex.
 
bool isConsistent () const
 Whether the vertex is consistent.
 
bool isPruned () const
 Whether the vertex has been pruned.
 
bool isExpandedOnCurrentApproximation () const
 Returns whether the vertex is expanded on current approximation.
 
bool isExpandedOnCurrentSearch () const
 Returns whether the vertex is expaned on current search.
 
bool hasEverBeenExpandedAsRewiring () const
 Returns whether the vertex has ever been expanded as a rewiring.
 
void addParent (const VertexPtr &newParent, const ompl::base::Cost &edgeInCost)
 Set the parent of this vertex, cannot be used to replace a previous parent. Will always update this vertex's cost, and can update descendent costs.
 
void removeParent (bool updateChildCosts)
 Remove the parent of this vertex. Will always update this vertex's cost, and can update the descendent costs.
 
bool hasChildren () const
 Get whether this vertex has any children.
 
void getChildren (VertexConstPtrVector *children) const
 Get the children of a vertex as constant pointers.
 
void getChildren (VertexPtrVector *children)
 Get the children of a vertex as mutable pointers.
 
void addChild (const VertexPtr &newChild)
 Add a child to this vertex. Does not change this vertex's cost or those of its descendants. Child must already have this vertex listed as it's parent.
 
void removeChild (const VertexPtr &oldChild)
 Remove a child from this vertex. Does not change this vertex's cost or those of its descendants. Child must still have this vertex listed as its parent and it will also throw an exception if the given vertex pointer is not found.
 
void blacklistChild (const VertexConstPtr &vertex)
 Put the vertex on the blacklist of children.
 
void whitelistChild (const VertexConstPtr &vertex)
 Put the vertex on the whitelist of children.
 
bool isBlacklistedAsChild (const VertexConstPtr &vertex) const
 Returns true if the vertex is blacklisted as a child of this vertex.
 
bool isWhitelistedAsChild (const VertexConstPtr &vertex) const
 Returns true if the vertex is blacklisted as a child of this vertex.
 
void clearBlacklist ()
 Clears the blacklist.
 
void clearWhitelist ()
 Clears the whitelist.
 
ompl::base::Cost getCost () const
 Get the cost-to-come of a vertex. Return infinity if the edge is disconnected.
 
ompl::base::Cost getEdgeInCost () const
 Get the incremental cost-to-come of a vertex.
 
void registerExpansion ()
 Mark the vertex as expanded.
 
void registerRewiringExpansion ()
 Mark expansion to vertices.
 
void markPruned ()
 Mark the vertex as pruned.
 
void markUnpruned ()
 Mark the vertex as unpruned.
 
void insertInEdgeQueueInLookup (const SearchQueue::EdgeQueueElemPtr &inEdge)
 Add to the list of the edge queue entries that point in to this vertex. Will clear existing in/out lookups if they were added under a different id.
 
void insertInEdgeQueueOutLookup (const SearchQueue::EdgeQueueElemPtr &outEdge)
 Add to the list of the edge queue entries that point out of this vertex. Will clear existing in/out lookups if they were added under a different id.
 
void removeFromEdgeQueueInLookup (const SearchQueue::EdgeQueueElemPtr &inEdge)
 Remove an incoming edge queue entry by value to the member vector.
 
void removeFromEdgeQueueOutLookup (const SearchQueue::EdgeQueueElemPtr &outEdge)
 Remove an outgoing edge queue entry by value.
 
void removeFromEdgeQueueInLookup (const SearchQueue::EdgeQueueElemPtrVector::const_iterator &inEdge)
 Remove an incoming edge queue entry by iterator to the member vector.
 
void removeFromEdgeQueueOutLookup (const SearchQueue::EdgeQueueElemPtrVector::const_iterator &outEdge)
 Remove an outgoing edge queue entry by iterator to the member vector.
 
BITstar::SearchQueue::EdgeQueueElemPtrVector::const_iterator edgeQueueInLookupConstBegin ()
 Get an iterator to the front of the incoming edge queue entry vector. Will clear existing in/out lookups if they were added under a different id.
 
BITstar::SearchQueue::EdgeQueueElemPtrVector::const_iterator edgeQueueOutLookupConstBegin ()
 Get an iterator to the front of the outgoing edge queue entry vector. Will clear existing in/out lookups if they were added under a different id.
 
BITstar::SearchQueue::EdgeQueueElemPtrVector::const_iterator edgeQueueInLookupConstEnd ()
 Get an iterator to the end of the incoming edge queue entry vector. Will clear existing in/out lookups if they were added under a different id.
 
BITstar::SearchQueue::EdgeQueueElemPtrVector::const_iterator edgeQueueOutLookupConstEnd ()
 Get an iterator to the end of the outgoing edge queue entry vector. Will clear existing in/out lookups if they were added under a different id.
 
unsigned int edgeQueueInLookupSize ()
 Get the number of edge queue entries incoming to this vertex. Will clear existing in/out lookups if they were added under a different id.
 
unsigned int edgeQueueOutLookupSize ()
 Get the number of edge queue entries outgoing from this vertex. Will clear existing in/out lookups if they were added under a different id.
 
void clearEdgeQueueInLookup ()
 Clear the pointers to all of the incoming edge queue entries.
 
void clearEdgeQueueOutLookup ()
 Clear the pointers to all of the outgoing edge queue entries.
 

Detailed Description

The vertex of the underlying graphs in gBITstar BIT*.

Short description
A class to store a state as a vertex in a (tree) graph. Allocates and frees it's own memory on construction/destruction. Parent vertices are owned by their children as shared pointers, assuring that a parent vertex will not be deleted while the child exists. Child vertices are owned by their parents as weak pointers, assuring that the shared-pointer ownership loop is broken.
Note
Add/Remove functions should almost always update their children's cost. The only known exception is when a series of operations are being performed and it would be beneficial to delay the update until the last operation. In this case, make sure that the last call updates the children and is on the highest ancestor that has been changed. Updates only flow downstream.

Definition at line 131 of file Vertex.h.


The documentation for this class was generated from the following files:
  • ompl/geometric/planners/informedtrees/bitstar/Vertex.h
  • ompl/geometric/planners/informedtrees/bitstar/src/Vertex.cpp