hivemind 1.0.0
Loading...
Searching...
No Matches
Routemaker::Node< T > Struct Template Reference

Represents a node in a Graph data structured made for path-finding. More...

#include <graph.h>

Collaboration diagram for Routemaker::Node< T >:
Collaboration graph

Public Attributes

Data
 Data stored in the the node.
 
std::weak_ptr< Node< T > > Parent
 A non-owner pointer to the parent of the node.
 
bool Visited
 Specifies if a given node has been visited during path-finding.
 
double GlobalGoal
 Represents the assumed cost from the start to the goal node through this node.
 
double LocalGoal
 Represents the cost from the start node to this node.
 

Detailed Description

template<typename T>
struct Routemaker::Node< T >

Represents a node in a Graph data structured made for path-finding.

Template Parameters
TType of data to store inside the node

Definition at line 17 of file graph.h.

Member Data Documentation

◆ Data

template<typename T >
T Routemaker::Node< T >::Data

Data stored in the the node.

Stores data not needed by the A* path-finding algorithm. This is what the user actually wants to store in the Graph.

Definition at line 23 of file graph.h.

Referenced by Routemaker::Routemaker::UpdateOrigin().

◆ GlobalGoal

template<typename T >
double Routemaker::Node< T >::GlobalGoal

Represents the assumed cost from the start to the goal node through this node.

Should not be set by the user. The A* path-finding algorithm uses cost to find the shortest path in a reasonable amount of time. This member contains the sum of the cost to get to this node from the start node, represented in LocalGoal, plus the assumed cost to get from this node to the goal node. The A* path-finding algorithm uses this value during Graph traversal to sort a priority queue in order to explore the assumed shortest paths first.

Definition at line 52 of file graph.h.

◆ LocalGoal

template<typename T >
double Routemaker::Node< T >::LocalGoal

Represents the cost from the start node to this node.

Should not be set by the user. The A* path-finding algorithm uses cost to find the shortest path in a reasonable amount of time. This member contains the sum of the cost to get to this node from the start node. While traversing the Graph, the A* path-finding algorithm updates and uses this member to check for shorter paths.

Definition at line 62 of file graph.h.

◆ Parent

template<typename T >
std::weak_ptr<Node<T> > Routemaker::Node< T >::Parent

A non-owner pointer to the parent of the node.

Should not be set by user. The A* path-finding algorithm sets the value for this member when traversing the Graph. It used to find the way back to the start after the goal is found.

Definition at line 30 of file graph.h.

◆ Visited

template<typename T >
bool Routemaker::Node< T >::Visited

Specifies if a given node has been visited during path-finding.

Should not be set by user. Is generally only used internally by the A* path-finding algorithm when traversing the Graph. May be used in debug views to visualize which nodes are visited during path-finding.

Definition at line 39 of file graph.h.


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