48 return approx_equal &&
node == p2.
node;
71 return (!((*
this) == p2));
138 void AddNode(
int node,
float cost);
345 for (
int i = 0; i < p.
size(); i++) {
346 const auto& pm = p[i];
348 os <<
"(" << pm.node <<
")";
350 os <<
" -" << pm.cost <<
"-> ";
Contains definitions for the HF::SpatialStructures namespace.
ostream & operator<<(ostream &os, const HF::SpatialStructures::Node n)
Create a string containing the x,y,z position of this node.
Contains standard fundamental data structures for representing space used throughout DHARTAPI.
constexpr float ROUNDING_PRECISION
Minimum value that can be represented in DHART_API.
The ID of a node, and the cost cost to the node after it.
bool operator!=(const PathMember &p2) const
Determines if this pathmember amd p2 do NOT have equal cost/node values.
float cost
Cost of traversing to the next path member in the path.
int node
ID of the node this represents in the graph.
bool operator==(const PathMember &p2) const
Compare the id and cost of this node with p2.
A collection of nodes that form a path.
int size() const
Determine how many nodes are in this path.
bool empty() const
Determine if this path has any nodes in it.
PathMember operator[](int i) const
Retrieve the node and cost in this path at index i.
void AddNode(int node, float cost)
Add a new node to the path.
Path::Path()
Construct an empty path.
std::vector< PathMember > members
Ordered array of PathMembers that comprise the path.
PathMember * GetPMPointer()
Get a pointer to the path's underlying path members vector.
bool operator==(const Path &p2) const
Determine if this path is identical to p2.
void Reverse()
Reverse the direction of this path.