DHART
Loading...
Searching...
No Matches
HF::SpatialStructures::PathMember Struct Reference

The ID of a node, and the cost cost to the node after it. More...

#include <path.h>

+ Collaboration diagram for HF::SpatialStructures::PathMember:

Public Member Functions

bool operator== (const PathMember &p2) const
 Compare the id and cost of this node with p2. More...
 
bool operator!= (const PathMember &p2) const
 Determines if this pathmember amd p2 do NOT have equal cost/node values. More...
 

Public Attributes

float cost
 Cost of traversing to the next path member in the path. More...
 
int node
 ID of the node this represents in the graph. More...
 

Detailed Description

The ID of a node, and the cost cost to the node after it.

Definition at line 19 of file path.h.

Member Function Documentation

◆ operator!=()

bool HF::SpatialStructures::PathMember::operator!= ( const PathMember p2) const
inline

Determines if this pathmember amd p2 do NOT have equal cost/node values.

Parameters
p2The PathMember to compare with this pathmember.
Returns
True if p1 and p2 do NOT have equivalent cost/node values, false otherwise.
// be sure to #include "path.h"
bool is_true = p1 != p2;
bool is_false = p0 != p1;
// applies the inverse of operator== to evaluate operator!= since fields of p1 and
// p2 have different values, is_true is in fact, true is_false evaluates to true.
The ID of a node, and the cost cost to the node after it.
Definition: path.h:19

Definition at line 70 of file path.h.

◆ operator==()

bool HF::SpatialStructures::PathMember::operator== ( const PathMember p2) const
inline

Compare the id and cost of this node with p2.

Parameters
p2The PathMember to compare with this node.
Returns
True if p1 and p2 have equivalent cost and node values, false otherwise.
// be sure to #include "path.h"
bool is_true = p1 == p2;
bool is_false = p0 == p1;
// cost and node fields of p1 and p2 are identical, so is_true evaluates true
// is_false evaluates false, since fields of p0 and p1 do not have matching values

Definition at line 41 of file path.h.

References cost, node, and HF::SpatialStructures::ROUNDING_PRECISION.

Member Data Documentation

◆ cost

float HF::SpatialStructures::PathMember::cost

Cost of traversing to the next path member in the path.

Definition at line 20 of file path.h.

Referenced by operator==().

◆ node

int HF::SpatialStructures::PathMember::node

ID of the node this represents in the graph.

Definition at line 21 of file path.h.

Referenced by operator==().


The documentation for this struct was generated from the following file: