PGROUTING  2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GraphDefinition Class Reference

#include "GraphDefinition.h"

Public Member Functions

 GraphDefinition (void)
 
 ~GraphDefinition (void)
 
bool construct_graph (edge_t *edges, int edge_count, bool has_reverse_cost, bool directed)
 
int multi_dijkstra (edge_t *edges, unsigned int edge_count, std::vector< int > vertices, bool directed, bool has_reverse_cost, path_element_t **path, int *path_count, char **err_msg, std::vector< PDVI > &ruleList)
 
int my_dijkstra (long start_vertex, long end_vertex, unsigned int edge_count, char **err_msg)
 
int my_dijkstra (edge_t *edges, unsigned int edge_count, long start_vertex, long end_vertex, bool directed, bool has_reverse_cost, path_element_t **path, int *path_count, char **err_msg)
 
int my_dijkstra (edge_t *edges, unsigned int edge_count, long start_vertex, long end_vertex, bool directed, bool has_reverse_cost, path_element_t **path, int *path_count, char **err_msg, std::vector< PDVI > &ruleList)
 
int my_dijkstra (edge_t *edges, unsigned int edge_count, int start_edge, double start_part, int end_edge, double end_part, bool directed, bool has_reverse_cost, path_element_t **path, int *path_count, char **err_msg, std::vector< PDVI > &ruleList)
 

Private Member Functions

bool addEdge (edge edgeIn)
 
bool connectEdge (GraphEdgeInfo &firstEdge, GraphEdgeInfo &secondEdge, bool bIsStartNodeSame)
 
double construct_path (long ed_id, int v_pos)
 
void deleteall ()
 
void explore (long cur_node, GraphEdgeInfo &cur_edge, bool isStart, LongVector &vecIndex, std::priority_queue< PDP, std::vector< PDP >, std::greater< PDP > > &que)
 
bool get_single_cost (double total_cost, path_element_t **path, int *path_count)
 
double getRestrictionCost (long cur_node, GraphEdgeInfo &new_edge, bool isStart)
 
void init ()
 

Private Attributes

bool isEndVirtual
 
bool isStartVirtual
 
bool m_bIsGraphConstructed
 
bool m_bIsturnRestrictOn
 
CostHolderm_dCost
 
double m_dEndPart
 
double m_dStartpart
 
int m_lEndEdgeId
 
int m_lStartEdgeId
 
Long2LongMap m_mapEdgeId2Index
 
Long2LongVectorMap m_mapNodeId2Edge
 
RuleTable m_ruleTable
 
GraphEdgeVector m_vecEdgeVector
 
std::vector< path_element_tm_vecPath
 
int max_edge_id
 
long max_node_id
 
PARENT_PATHparent
 

Detailed Description

Definition at line 87 of file GraphDefinition.h.

Constructor & Destructor Documentation

GraphDefinition::GraphDefinition ( void  )
GraphDefinition::~GraphDefinition ( void  )

Definition at line 26 of file GraphDefinition.cpp.

Member Function Documentation

bool GraphDefinition::connectEdge ( GraphEdgeInfo firstEdge,
GraphEdgeInfo secondEdge,
bool  bIsStartNodeSame 
)
private
bool GraphDefinition::construct_graph ( edge_t edges,
int  edge_count,
bool  has_reverse_cost,
bool  directed 
)
void GraphDefinition::deleteall ( )
private

Definition at line 42 of file GraphDefinition.cpp.

References m_dCost, m_vecEdgeVector, and parent.

Referenced by multi_dijkstra(), and my_dijkstra().

void GraphDefinition::explore ( long  cur_node,
GraphEdgeInfo cur_edge,
bool  isStart,
LongVector vecIndex,
std::priority_queue< PDP, std::vector< PDP >, std::greater< PDP > > &  que 
)
private
bool GraphDefinition::get_single_cost ( double  total_cost,
path_element_t **  path,
int *  path_count 
)
private
double GraphDefinition::getRestrictionCost ( long  cur_node,
GraphEdgeInfo new_edge,
bool  isStart 
)
private
void GraphDefinition::init ( )
private

Definition at line 32 of file GraphDefinition.cpp.

References isEndVirtual, isStartVirtual, max_edge_id, and max_node_id.

Referenced by GraphDefinition(), and my_dijkstra().

int GraphDefinition::multi_dijkstra ( edge_t edges,
unsigned int  edge_count,
std::vector< int >  vertices,
bool  directed,
bool  has_reverse_cost,
path_element_t **  path,
int *  path_count,
char **  err_msg,
std::vector< PDVI > &  ruleList 
)
int GraphDefinition::my_dijkstra ( edge_t edges,
unsigned int  edge_count,
long  start_vertex,
long  end_vertex,
bool  directed,
bool  has_reverse_cost,
path_element_t **  path,
int *  path_count,
char **  err_msg,
std::vector< PDVI > &  ruleList 
)
int GraphDefinition::my_dijkstra ( edge_t edges,
unsigned int  edge_count,
int  start_edge,
double  start_part,
int  end_edge,
double  end_part,
bool  directed,
bool  has_reverse_cost,
path_element_t **  path,
int *  path_count,
char **  err_msg,
std::vector< PDVI > &  ruleList 
)

Member Data Documentation

bool GraphDefinition::isEndVirtual
private

Definition at line 149 of file GraphDefinition.h.

Referenced by init(), and my_dijkstra().

bool GraphDefinition::isStartVirtual
private

Definition at line 148 of file GraphDefinition.h.

Referenced by init(), and my_dijkstra().

bool GraphDefinition::m_bIsGraphConstructed
private

Definition at line 156 of file GraphDefinition.h.

Referenced by construct_graph(), GraphDefinition(), and my_dijkstra().

bool GraphDefinition::m_bIsturnRestrictOn
private

Definition at line 155 of file GraphDefinition.h.

Referenced by explore(), GraphDefinition(), multi_dijkstra(), and my_dijkstra().

CostHolder* GraphDefinition::m_dCost
private
double GraphDefinition::m_dEndPart
private

Definition at line 147 of file GraphDefinition.h.

Referenced by get_single_cost(), GraphDefinition(), and my_dijkstra().

double GraphDefinition::m_dStartpart
private

Definition at line 146 of file GraphDefinition.h.

Referenced by get_single_cost(), GraphDefinition(), and my_dijkstra().

int GraphDefinition::m_lEndEdgeId
private

Definition at line 145 of file GraphDefinition.h.

Referenced by GraphDefinition(), and my_dijkstra().

int GraphDefinition::m_lStartEdgeId
private

Definition at line 144 of file GraphDefinition.h.

Referenced by get_single_cost(), GraphDefinition(), and my_dijkstra().

Long2LongMap GraphDefinition::m_mapEdgeId2Index
private

Definition at line 140 of file GraphDefinition.h.

Referenced by addEdge(), get_single_cost(), and my_dijkstra().

Long2LongVectorMap GraphDefinition::m_mapNodeId2Edge
private

Definition at line 141 of file GraphDefinition.h.

Referenced by addEdge(), and my_dijkstra().

RuleTable GraphDefinition::m_ruleTable
private

Definition at line 154 of file GraphDefinition.h.

Referenced by getRestrictionCost(), multi_dijkstra(), and my_dijkstra().

GraphEdgeVector GraphDefinition::m_vecEdgeVector
private
std::vector<path_element_t> GraphDefinition::m_vecPath
private

Definition at line 151 of file GraphDefinition.h.

Referenced by construct_path(), multi_dijkstra(), and my_dijkstra().

int GraphDefinition::max_edge_id
private

Definition at line 143 of file GraphDefinition.h.

Referenced by addEdge(), init(), and my_dijkstra().

long GraphDefinition::max_node_id
private

Definition at line 142 of file GraphDefinition.h.

Referenced by addEdge(), init(), and my_dijkstra().

PARENT_PATH* GraphDefinition::parent
private

The documentation for this class was generated from the following files: