PGROUTING
3.2
|
#include "GraphDefinition.h"
Public Member Functions | |
GraphDefinition (void) | |
~GraphDefinition (void) | |
bool | construct_graph (edge_t *edges, size_t edge_count, bool has_reverse_cost, bool directed) |
int | my_dijkstra1 (edge_t *edges, size_t edge_count, int64 start_edge, double start_part, int64 end_edge, double end_part, bool directed, bool has_reverse_cost, path_element_tt **path, size_t *path_count, char **err_msg, std::vector< PDVI > &ruleList) |
int | my_dijkstra2 (edge_t *edges, size_t edge_count, int64 start_vertex, int64 end_vertex, bool directed, bool has_reverse_cost, path_element_tt **path, size_t *path_count, char **err_msg, std::vector< PDVI > &ruleList) |
int | my_dijkstra3 (edge_t *edges, size_t edge_count, int64 start_vertex, int64 end_vertex, bool directed, bool has_reverse_cost, path_element_tt **path, size_t *path_count, char **err_msg) |
Private Member Functions | |
bool | addEdge (edge_t edgeIn) |
bool | connectEdge (GraphEdgeInfo &firstEdge, GraphEdgeInfo &secondEdge, bool bIsStartNodeSame) |
double | construct_path (int64 ed_id, int64 v_pos) |
void | deleteall () |
void | explore (int64 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_tt **path, size_t *path_count) |
double | getRestrictionCost (int64 cur_node, GraphEdgeInfo &new_edge, bool isStart) |
void | init () |
Private Attributes | |
bool | isEndVirtual |
bool | isStartVirtual |
bool | m_bIsGraphConstructed |
bool | m_bIsturnRestrictOn |
CostHolder * | m_dCost |
double | m_dEndPart |
double | m_dStartpart |
int64 | m_lEndEdgeId |
int64 | m_lStartEdgeId |
Long2LongMap | m_mapEdgeId2Index |
Long2LongVectorMap | m_mapNodeId2Edge |
RuleTable | m_ruleTable |
GraphEdgeVector | m_vecEdgeVector |
std::vector< path_element_tt > | m_vecPath |
int64 | max_edge_id |
int64 | max_node_id |
PARENT_PATH * | parent |
Definition at line 115 of file GraphDefinition.h.
GraphDefinition::GraphDefinition | ( | void | ) |
Definition at line 39 of file GraphDefinition.cpp.
References init(), m_bIsGraphConstructed, m_bIsturnRestrictOn, m_dCost, m_dEndPart, m_dStartpart, m_lEndEdgeId, m_lStartEdgeId, and parent.
GraphDefinition::~GraphDefinition | ( | void | ) |
Definition at line 52 of file GraphDefinition.cpp.
|
private |
Definition at line 594 of file GraphDefinition.cpp.
References connectEdge(), edge_t::cost, edge_t::id, GraphEdgeInfo::m_dCost, GraphEdgeInfo::m_dReverseCost, GraphEdgeInfo::m_lEdgeID, GraphEdgeInfo::m_lEdgeIndex, GraphEdgeInfo::m_lEndNode, GraphEdgeInfo::m_lStartNode, m_mapEdgeId2Index, m_mapNodeId2Edge, m_vecEdgeVector, GraphEdgeInfo::m_vecEndConnedtedEdge, GraphEdgeInfo::m_vecRestrictedEdge, GraphEdgeInfo::m_vecStartConnectedEdge, max_edge_id, max_node_id, edge_t::reverse_cost, edge_t::source, and edge_t::target.
Referenced by construct_graph(), and my_dijkstra1().
|
private |
Definition at line 561 of file GraphDefinition.cpp.
References GraphEdgeInfo::m_dCost, GraphEdgeInfo::m_dReverseCost, GraphEdgeInfo::m_lEdgeIndex, GraphEdgeInfo::m_lEndNode, GraphEdgeInfo::m_lStartNode, GraphEdgeInfo::m_vecEndConnedtedEdge, and GraphEdgeInfo::m_vecStartConnectedEdge.
Referenced by addEdge().
bool GraphDefinition::construct_graph | ( | edge_t * | edges, |
size_t | edge_count, | ||
bool | has_reverse_cost, | ||
bool | directed | ||
) |
Definition at line 543 of file GraphDefinition.cpp.
References addEdge(), edge_t::cost, m_bIsGraphConstructed, and edge_t::reverse_cost.
Referenced by my_dijkstra1(), and my_dijkstra3().
|
private |
Definition at line 79 of file GraphDefinition.cpp.
References path_element::cost, path_element::edge_id, CostHolder::endCost, GraphEdgeInfo::m_dCost, m_dCost, GraphEdgeInfo::m_dReverseCost, GraphEdgeInfo::m_lEdgeID, GraphEdgeInfo::m_lEndNode, GraphEdgeInfo::m_lStartNode, m_vecEdgeVector, m_vecPath, parent, CostHolder::startCost, and path_element::vertex_id.
Referenced by my_dijkstra3().
|
private |
Definition at line 66 of file GraphDefinition.cpp.
References m_dCost, m_vecEdgeVector, and parent.
Referenced by my_dijkstra3().
|
private |
Definition at line 153 of file GraphDefinition.cpp.
References PARENT_PATH::ed_ind, CostHolder::endCost, getRestrictionCost(), m_bIsturnRestrictOn, m_dCost, GraphEdgeInfo::m_lEdgeIndex, m_vecEdgeVector, parent, CostHolder::startCost, and PARENT_PATH::v_pos.
Referenced by my_dijkstra3().
|
private |
Definition at line 506 of file GraphDefinition.cpp.
References GraphEdgeInfo::m_dCost, m_dEndPart, GraphEdgeInfo::m_dReverseCost, m_dStartpart, m_lStartEdgeId, m_mapEdgeId2Index, m_vecEdgeVector, and path_element::vertex_id.
Referenced by my_dijkstra3().
|
private |
Definition at line 117 of file GraphDefinition.cpp.
References GraphEdgeInfo::m_lEdgeID, m_ruleTable, m_vecEdgeVector, parent, and PARENT_PATH::v_pos.
Referenced by explore().
|
private |
Definition at line 57 of file GraphDefinition.cpp.
References isEndVirtual, isStartVirtual, max_edge_id, and max_node_id.
Referenced by GraphDefinition(), my_dijkstra1(), and my_dijkstra3().
int GraphDefinition::my_dijkstra1 | ( | edge_t * | edges, |
size_t | edge_count, | ||
int64 | start_edge, | ||
double | start_part, | ||
int64 | end_edge, | ||
double | end_part, | ||
bool | directed, | ||
bool | has_reverse_cost, | ||
path_element_tt ** | path, | ||
size_t * | path_count, | ||
char ** | err_msg, | ||
std::vector< PDVI > & | ruleList | ||
) |
Definition at line 210 of file GraphDefinition.cpp.
References addEdge(), construct_graph(), edge_t::cost, edge_t::id, init(), isEndVirtual, isStartVirtual, m_bIsGraphConstructed, GraphEdgeInfo::m_dCost, m_dEndPart, GraphEdgeInfo::m_dReverseCost, m_dStartpart, m_lEndEdgeId, GraphEdgeInfo::m_lEndNode, m_lStartEdgeId, GraphEdgeInfo::m_lStartNode, m_mapEdgeId2Index, m_vecEdgeVector, max_edge_id, max_node_id, my_dijkstra2(), edge_t::reverse_cost, edge_t::source, and edge_t::target.
Referenced by trsp_edge_wrapper().
int GraphDefinition::my_dijkstra2 | ( | edge_t * | edges, |
size_t | edge_count, | ||
int64 | start_vertex, | ||
int64 | end_vertex, | ||
bool | directed, | ||
bool | has_reverse_cost, | ||
path_element_tt ** | path, | ||
size_t * | path_count, | ||
char ** | err_msg, | ||
std::vector< PDVI > & | ruleList | ||
) |
Definition at line 307 of file GraphDefinition.cpp.
References isEndVirtual, isStartVirtual, m_bIsturnRestrictOn, m_lEndEdgeId, m_lStartEdgeId, m_mapNodeId2Edge, m_ruleTable, m_vecEdgeVector, and my_dijkstra3().
Referenced by my_dijkstra1().
int GraphDefinition::my_dijkstra3 | ( | edge_t * | edges, |
size_t | edge_count, | ||
int64 | start_vertex, | ||
int64 | end_vertex, | ||
bool | directed, | ||
bool | has_reverse_cost, | ||
path_element_tt ** | path, | ||
size_t * | path_count, | ||
char ** | err_msg | ||
) |
Definition at line 368 of file GraphDefinition.cpp.
References construct_graph(), construct_path(), path_element::cost, deleteall(), PARENT_PATH::ed_ind, path_element::edge_id, CostHolder::endCost, explore(), get_single_cost(), init(), isEndVirtual, isStartVirtual, m_bIsGraphConstructed, GraphEdgeInfo::m_dCost, m_dCost, GraphEdgeInfo::m_dReverseCost, GraphEdgeInfo::m_lEdgeIndex, m_lEndEdgeId, GraphEdgeInfo::m_lEndNode, m_lStartEdgeId, GraphEdgeInfo::m_lStartNode, m_mapNodeId2Edge, m_vecEdgeVector, GraphEdgeInfo::m_vecEndConnedtedEdge, m_vecPath, GraphEdgeInfo::m_vecStartConnectedEdge, parent, CostHolder::startCost, PARENT_PATH::v_pos, and path_element::vertex_id.
Referenced by my_dijkstra2().
|
private |
Definition at line 171 of file GraphDefinition.h.
Referenced by init(), my_dijkstra1(), my_dijkstra2(), and my_dijkstra3().
|
private |
Definition at line 170 of file GraphDefinition.h.
Referenced by init(), my_dijkstra1(), my_dijkstra2(), and my_dijkstra3().
|
private |
Definition at line 178 of file GraphDefinition.h.
Referenced by construct_graph(), GraphDefinition(), my_dijkstra1(), and my_dijkstra3().
|
private |
Definition at line 177 of file GraphDefinition.h.
Referenced by explore(), GraphDefinition(), and my_dijkstra2().
|
private |
Definition at line 175 of file GraphDefinition.h.
Referenced by construct_path(), deleteall(), explore(), GraphDefinition(), and my_dijkstra3().
|
private |
Definition at line 169 of file GraphDefinition.h.
Referenced by get_single_cost(), GraphDefinition(), and my_dijkstra1().
|
private |
Definition at line 168 of file GraphDefinition.h.
Referenced by get_single_cost(), GraphDefinition(), and my_dijkstra1().
|
private |
Definition at line 167 of file GraphDefinition.h.
Referenced by GraphDefinition(), my_dijkstra1(), my_dijkstra2(), and my_dijkstra3().
|
private |
Definition at line 166 of file GraphDefinition.h.
Referenced by get_single_cost(), GraphDefinition(), my_dijkstra1(), my_dijkstra2(), and my_dijkstra3().
|
private |
Definition at line 162 of file GraphDefinition.h.
Referenced by addEdge(), get_single_cost(), and my_dijkstra1().
|
private |
Definition at line 163 of file GraphDefinition.h.
Referenced by addEdge(), my_dijkstra2(), and my_dijkstra3().
|
private |
Definition at line 176 of file GraphDefinition.h.
Referenced by getRestrictionCost(), and my_dijkstra2().
|
private |
Definition at line 161 of file GraphDefinition.h.
Referenced by addEdge(), construct_path(), deleteall(), explore(), get_single_cost(), getRestrictionCost(), my_dijkstra1(), my_dijkstra2(), and my_dijkstra3().
|
private |
Definition at line 173 of file GraphDefinition.h.
Referenced by construct_path(), and my_dijkstra3().
|
private |
Definition at line 165 of file GraphDefinition.h.
Referenced by addEdge(), init(), and my_dijkstra1().
|
private |
Definition at line 164 of file GraphDefinition.h.
Referenced by addEdge(), init(), and my_dijkstra1().
|
private |
Definition at line 174 of file GraphDefinition.h.
Referenced by construct_path(), deleteall(), explore(), getRestrictionCost(), GraphDefinition(), and my_dijkstra3().