DHART
|
A graph usable with the BoostGraphLibrary. More...
#include <boost_graph.h>
Public Member Functions | |
BoostGraph (const HF::SpatialStructures::Graph &graph, const std::string &cost_type="") | |
Create a boost graph from a HF::SpatialStructures::Graph. More... | |
~BoostGraph () | |
Explicit Destructor required for BoostGraphDeleter to work in path_finder.h. More... | |
Public Attributes | |
graph_t | g |
The underlying graph in boost. More... | |
std::vector< vertex_descriptor > | p |
Vertex array preallocated to the number of nodes in the graph. More... | |
std::vector< double > | d |
Distance array preallocated to the number of nodes in the graph. More... | |
A graph usable with the BoostGraphLibrary.
Contains a CSR in boost created from a graph in DHARTAPI. This is necessary for using any of the BoostGraphLibrary functions.
Definition at line 166 of file boost_graph.h.
HF::Pathfinding::BoostGraph::BoostGraph | ( | const HF::SpatialStructures::Graph & | graph, |
const std::string & | cost_type = "" |
||
) |
Create a boost graph from a HF::SpatialStructures::Graph.
graph | Graph to create a graph in boost from. |
cost_type | The name of the cost set in graph that will be used to construct this boost graph Leaving this as blank will use the cost type the graph was constructed with. |
Every edge and node in the graph is used to create a graph in Boost. This will also allocate space equal to the number of nodes in g for this class's p and d arrays for use in FindPath as an optimization.
cost_type
is specified, and is not an empty string, then cost_type
must be the key of an already created cost in graph
. graph
must be compressed.HF::Exceptions::NoCost | if cost_type was not left blank and no cost type with the key cost_type exists in graph . |
Definition at line 23 of file boost_graph.cpp.
References d, g, HF::SpatialStructures::Graph::GetEdges(), HF::SpatialStructures::Graph::MaxID(), p, HF::SpatialStructures::Graph::size(), and HF::Pathfinding::Edge_Cost::weight.
|
default |
Explicit Destructor required for BoostGraphDeleter to work in path_finder.h.
Calls the default destruction behavior.
std::vector<double> HF::Pathfinding::BoostGraph::d |
Distance array preallocated to the number of nodes in the graph.
Definition at line 170 of file boost_graph.h.
Referenced by BoostGraph().
graph_t HF::Pathfinding::BoostGraph::g |
The underlying graph in boost.
Definition at line 168 of file boost_graph.h.
Referenced by BoostGraph(), HF::Pathfinding::FindPath(), HF::Pathfinding::FindPaths(), HF::Pathfinding::GenerateDistanceAndPred(), and HF::Pathfinding::InsertPathsIntoArray().
std::vector<vertex_descriptor> HF::Pathfinding::BoostGraph::p |
Vertex array preallocated to the number of nodes in the graph.
Definition at line 169 of file boost_graph.h.
Referenced by BoostGraph(), HF::Pathfinding::GenerateDistanceAndPred(), and HF::Pathfinding::InsertAllToAllPathsIntoArray().