pgRouting
pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BiDirDijkstra Class Reference

#include "BiDirDijkstra.h"

Public Member Functions

 BiDirDijkstra (void)
 
 ~BiDirDijkstra (void)
 
int bidir_dijkstra (edge_t *edges, unsigned int edge_count, int maxNode, int start_vertex, int end_vertex, path_element_t **path, int *path_count, char **err_msg)
 

Private Member Functions

bool addEdge (edge_t edgeIn)
 
bool connectEdge (GraphEdgeInfo &firstEdge, GraphEdgeInfo &secondEdge, bool bIsStartNodeSame)
 
bool construct_graph (edge_t *edges, int edge_count, int maxNode)
 
void deleteall ()
 
void explore (int cur_node, double cur_cost, int dir, std::priority_queue< PDI, std::vector< PDI >, std::greater< PDI > > &que)
 
void fconstruct_path (int node_id)
 
double getcost (int node_id, int dir)
 
void init ()
 
void initall (int maxNode)
 
void rconstruct_path (int node_id)
 
void setcost (int node_id, int dir, double c)
 
void setparent (int node_id, int dir, int parnode, int paredge)
 

Private Attributes

int m_lEndNodeId
 
int m_lStartNodeId
 
Long2LongMap m_mapEdgeId2Index
 
Long2LongVectorMap m_mapNodeId2Edge
 
int m_MidNode
 
double m_MinCost
 
double * m_pFCost
 
PARENT_PATHm_pFParent
 
double * m_pRCost
 
PARENT_PATHm_pRParent
 
GraphEdgeVector m_vecEdgeVector
 
GraphNodeVector m_vecNodeVector
 
std::vector< path_element_tm_vecPath
 
int max_edge_id
 
int max_node_id
 

Detailed Description

Definition at line 78 of file BiDirDijkstra.h.

Constructor & Destructor Documentation

BiDirDijkstra::BiDirDijkstra ( void  )

Definition at line 43 of file BiDirDijkstra.cpp.

BiDirDijkstra::~BiDirDijkstra ( void  )

Definition at line 46 of file BiDirDijkstra.cpp.

Member Function Documentation

int BiDirDijkstra::bidir_dijkstra ( edge_t edges,
unsigned int  edge_count,
int  maxNode,
int  start_vertex,
int  end_vertex,
path_element_t **  path,
int *  path_count,
char **  err_msg 
)
bool BiDirDijkstra::connectEdge ( GraphEdgeInfo firstEdge,
GraphEdgeInfo secondEdge,
bool  bIsStartNodeSame 
)
private
bool BiDirDijkstra::construct_graph ( edge_t edges,
int  edge_count,
int  maxNode 
)
private
void BiDirDijkstra::deleteall ( )
private

Definition at line 88 of file BiDirDijkstra.cpp.

References m_pFCost, m_pFParent, m_pRCost, m_pRParent, m_vecEdgeVector, and m_vecNodeVector.

Referenced by bidir_dijkstra().

void BiDirDijkstra::explore ( int  cur_node,
double  cur_cost,
int  dir,
std::priority_queue< PDI, std::vector< PDI >, std::greater< PDI > > &  que 
)
private
void BiDirDijkstra::fconstruct_path ( int  node_id)
private
double BiDirDijkstra::getcost ( int  node_id,
int  dir 
)
private

Definition at line 108 of file BiDirDijkstra.cpp.

References m_pFCost, and m_pRCost.

Referenced by explore().

void BiDirDijkstra::init ( )
private

Definition at line 49 of file BiDirDijkstra.cpp.

void BiDirDijkstra::initall ( int  maxNode)
private
void BiDirDijkstra::rconstruct_path ( int  node_id)
private
void BiDirDijkstra::setcost ( int  node_id,
int  dir,
double  c 
)
private

Definition at line 118 of file BiDirDijkstra.cpp.

References m_pFCost, and m_pRCost.

Referenced by explore().

void BiDirDijkstra::setparent ( int  node_id,
int  dir,
int  parnode,
int  paredge 
)
private

Definition at line 126 of file BiDirDijkstra.cpp.

References m_pFParent, m_pRParent, PARENT_PATH::par_Edge, and PARENT_PATH::par_Node.

Referenced by explore().

Member Data Documentation

int BiDirDijkstra::m_lEndNodeId
private

Definition at line 109 of file BiDirDijkstra.h.

int BiDirDijkstra::m_lStartNodeId
private

Definition at line 108 of file BiDirDijkstra.h.

Long2LongMap BiDirDijkstra::m_mapEdgeId2Index
private

Definition at line 103 of file BiDirDijkstra.h.

Referenced by addEdge().

Long2LongVectorMap BiDirDijkstra::m_mapNodeId2Edge
private

Definition at line 104 of file BiDirDijkstra.h.

int BiDirDijkstra::m_MidNode
private

Definition at line 112 of file BiDirDijkstra.h.

Referenced by bidir_dijkstra(), explore(), and initall().

double BiDirDijkstra::m_MinCost
private

Definition at line 111 of file BiDirDijkstra.h.

Referenced by bidir_dijkstra(), explore(), and initall().

double* BiDirDijkstra::m_pFCost
private

Definition at line 116 of file BiDirDijkstra.h.

Referenced by bidir_dijkstra(), deleteall(), fconstruct_path(), getcost(), initall(), and setcost().

PARENT_PATH* BiDirDijkstra::m_pFParent
private

Definition at line 114 of file BiDirDijkstra.h.

Referenced by bidir_dijkstra(), deleteall(), fconstruct_path(), initall(), and setparent().

double* BiDirDijkstra::m_pRCost
private

Definition at line 117 of file BiDirDijkstra.h.

Referenced by bidir_dijkstra(), deleteall(), getcost(), initall(), rconstruct_path(), and setcost().

PARENT_PATH* BiDirDijkstra::m_pRParent
private

Definition at line 115 of file BiDirDijkstra.h.

Referenced by bidir_dijkstra(), deleteall(), initall(), rconstruct_path(), and setparent().

GraphEdgeVector BiDirDijkstra::m_vecEdgeVector
private

Definition at line 102 of file BiDirDijkstra.h.

Referenced by addEdge(), construct_graph(), deleteall(), and explore().

GraphNodeVector BiDirDijkstra::m_vecNodeVector
private

Definition at line 105 of file BiDirDijkstra.h.

Referenced by addEdge(), construct_graph(), deleteall(), explore(), and initall().

std::vector<path_element_t> BiDirDijkstra::m_vecPath
private

Definition at line 113 of file BiDirDijkstra.h.

Referenced by bidir_dijkstra(), fconstruct_path(), initall(), and rconstruct_path().

int BiDirDijkstra::max_edge_id
private

Definition at line 107 of file BiDirDijkstra.h.

Referenced by addEdge(), and bidir_dijkstra().

int BiDirDijkstra::max_node_id
private

Definition at line 106 of file BiDirDijkstra.h.

Referenced by addEdge(), and bidir_dijkstra().


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