Vertex.cpp
54 BITstar::Vertex::Vertex(ompl::base::SpaceInformationPtr si, ompl::base::OptimizationObjectivePtr opt,
125 throw ompl::Exception("Attempting to get the depth of a vertex that does not have a parent yet is not "
187 throw ompl::Exception("Attempting to add a parent to the root vertex, which cannot have a parent.");
208 throw ompl::Exception("Attempting to remove the parent of a vertex that does not have a parent.");
212 throw ompl::Exception("Attempting to remove the parent of the root vertex, which cannot have a "
243 throw ompl::Exception("A (weak) pointer to a child was found to have expired while collecting the "
265 throw ompl::Exception("A (weak) pointer to a child was found to have expired while collecting the "
297 // Iterate over the vector of children pointers until the child is found. Iterators make erase easier
341 throw ompl::Exception("Attempting to remove a child vertex not present in the vector of children "
361 throw ompl::Exception("Attempting to access the incoming-edge cost of a vertex without a parent.");
473 throw ompl::Exception("Attempting to update descendants' costs and depths of a vertex that does "
bool hasBeenExpandedToVertices() const
Returns true if the vertex has been expanded towards vertices.
Definition: Vertex.cpp:410
bool hasBeenExpandedToSamples() const
Returns true if the vertex has been expanded towards samples.
Definition: Vertex.cpp:389
unsigned int getDepth() const
Get the "depth" of the vertex from the root. A root vertex is at depth 0, a direct descendent of the ...
Definition: Vertex.cpp:118
STL namespace.
void updateCostAndDepth(bool cascadeUpdates=true)
Calculates the updated cost and depth of the current state, as well as calling all children's updateC...
Definition: Vertex.cpp:451
ompl::base::Cost getEdgeInCost() const
Get the incremental cost-to-come of a vertex.
Definition: Vertex.cpp:354
bool isNew() const
Returns true if the vertex is marked as new. Vertices are new until marked old.
Definition: Vertex.cpp:368
std::shared_ptr< const Vertex > VertexConstPtr
A constant vertex shared pointer.
Definition: BITstar.h:126
Vertex(ompl::base::SpaceInformationPtr si, ompl::base::OptimizationObjectivePtr opt, bool root=false)
Constructor.
Definition: Vertex.cpp:54
void addParent(const VertexPtr &newParent, const ompl::base::Cost &edgeInCost, bool updateChildCosts=true)
Set the parent of a vertex, cannot be used to replace a previous parent. Will update this vertex's co...
Definition: Vertex.cpp:175
ompl::base::State const * stateConst() const
The state of a vertex as a constant pointer.
Definition: Vertex.cpp:83
void removeChild(const VertexPtr &oldChild, bool updateChildCosts=true)
Remove a child vertex. Does not change this vertex's cost, and can update the child and its descenden...
Definition: Vertex.cpp:289
void removeParent(bool updateChildCosts=true)
Remove the parent edge. Will update this vertex's cost, and can update the descendent costs...
Definition: Vertex.cpp:201
void markUnexpandedToVertices()
Mark the vertex as not expanded towards vertices.
Definition: Vertex.cpp:424
A shared pointer wrapper for ompl::base::SpaceInformation.
ompl::base::Cost getCost() const
Get the cost-to-come of a vertex. Return infinity if the edge is disconnected.
Definition: Vertex.cpp:347
void addChild(const VertexPtr &newChild, bool updateChildCosts=true)
Add a child vertex. Does not change this vertex's cost, and can update the child and its descendent c...
Definition: Vertex.cpp:275
void getChildrenConst(VertexConstPtrVector *children) const
Get the children of a vertex as constant pointers.
Definition: Vertex.cpp:231
A shared pointer wrapper for ompl::base::OptimizationObjective.
void getChildren(VertexPtrVector *children)
Get the children of a vertex as mutable pointers.
Definition: Vertex.cpp:253
void markUnexpandedToSamples()
Mark the vertex as not expanded towards samples.
Definition: Vertex.cpp:403
std::vector< VertexConstPtr > VertexConstPtrVector
A vector of shared const pointers.
Definition: BITstar.h:132
Definition of a cost value. Can represent the cost of a motion or the cost of a state.
Definition: Cost.h:47
void markExpandedToVertices()
Mark the vertex as expanded towards vertices.
Definition: Vertex.cpp:417
VertexConstPtr getParentConst() const
Get the parent of a vertex as a constant pointer.
Definition: Vertex.cpp:133
bool isInTree() const
Get whether a vertex is "in the graph" or not. This returns true if the vertex is the graph root or i...
Definition: Vertex.cpp:111