31 if (P2.
size() != this->size())
return false;
34 for (
int i = 0; i < this->
size(); i++)
36 auto our_pm = (*this)[i];
37 auto their_pm = P2[i];
39 if (our_pm != their_pm)
52 Path::Path(
const std::vector<PathMember> & pm) {
Contains definitions for the Path structure.
Contains standard fundamental data structures for representing space used throughout DHARTAPI.
The ID of a node, and the cost cost to the node after it.
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.