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

#include "BiDirAStar.h"

Public Member Functions

 BiDirAStar (void)
 
 BiDirAStar (void)
 
 ~BiDirAStar (void)
 
 ~BiDirAStar (void)
 
int bidir_astar (edge_astar_t *edges, size_t edge_count, int maxNode, int start_vertex, int end_vertex, path_element_t **path, size_t *path_count, char **err_msg)
 
int bidir_astar (edge_astar_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_astar_t edgeIn)
 
bool addEdge (edge_astar_t edgeIn)
 
bool connectEdge (GraphEdgeInfo &firstEdge, GraphEdgeInfo &secondEdge, bool bIsStartNodeSame)
 
bool connectEdge (GraphEdgeInfo &firstEdge, GraphEdgeInfo &secondEdge, bool bIsStartNodeSame)
 
bool construct_graph (edge_astar_t *edges, size_t edge_count, int maxNode)
 
bool construct_graph (edge_astar_t *edges, int edge_count, int maxNode)
 
void deleteall ()
 
void deleteall ()
 
double dist (double x1, double y1, double x2, double y2)
 
double dist (double x1, double y1, double x2, double y2)
 
void explore (int cur_node, double cur_cost, int dir, MinHeap &que)
 
void explore (int cur_node, double cur_cost, int dir, MinHeap &que)
 
void fconstruct_path (int node_id)
 
void fconstruct_path (int node_id)
 
double getcost (int node_id, int dir)
 
double getcost (int node_id, int dir)
 
double gethcost (int node_id, int dir)
 
double gethcost (int node_id, int dir)
 
void init ()
 
void init ()
 
void initall (int maxNode)
 
void initall (int maxNode)
 
void rconstruct_path (int node_id)
 
void rconstruct_path (int node_id)
 
void setcost (int node_id, int dir, double c)
 
void setcost (int node_id, int dir, double c)
 
void setparent (int node_id, int dir, int parnode, int paredge)
 
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 83 of file src/BiDirAStar.h.

Constructor & Destructor Documentation

BiDirAStar::BiDirAStar ( void  )

Definition at line 41 of file src/BiDirAStar.cpp.

BiDirAStar::~BiDirAStar ( void  )

Definition at line 44 of file src/BiDirAStar.cpp.

BiDirAStar::BiDirAStar ( void  )
BiDirAStar::~BiDirAStar ( void  )

Member Function Documentation

bool BiDirAStar::addEdge ( edge_astar_t  edgeIn)
private
int BiDirAStar::bidir_astar ( edge_astar_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 BiDirAStar::connectEdge ( GraphEdgeInfo firstEdge,
GraphEdgeInfo secondEdge,
bool  bIsStartNodeSame 
)
private
bool BiDirAStar::connectEdge ( GraphEdgeInfo firstEdge,
GraphEdgeInfo secondEdge,
bool  bIsStartNodeSame 
)
private
bool BiDirAStar::construct_graph ( edge_astar_t edges,
size_t  edge_count,
int  maxNode 
)
private
bool BiDirAStar::construct_graph ( edge_astar_t edges,
int  edge_count,
int  maxNode 
)
private
void BiDirAStar::deleteall ( )
private

Definition at line 86 of file src/BiDirAStar.cpp.

References m_pFCost, m_pFParent, m_pRCost, and m_pRParent.

Referenced by bidir_astar().

void BiDirAStar::deleteall ( )
private
double BiDirAStar::dist ( double  x1,
double  y1,
double  x2,
double  y2 
)
private

Definition at line 108 of file src/BiDirAStar.cpp.

Referenced by gethcost().

double BiDirAStar::dist ( double  x1,
double  y1,
double  x2,
double  y2 
)
private
void BiDirAStar::explore ( int  cur_node,
double  cur_cost,
int  dir,
MinHeap que 
)
private
void BiDirAStar::explore ( int  cur_node,
double  cur_cost,
int  dir,
MinHeap que 
)
private
void BiDirAStar::fconstruct_path ( int  node_id)
private
void BiDirAStar::fconstruct_path ( int  node_id)
private
double BiDirAStar::getcost ( int  node_id,
int  dir 
)
private

Definition at line 99 of file src/BiDirAStar.cpp.

References m_pFCost, and m_pRCost.

Referenced by explore().

double BiDirAStar::getcost ( int  node_id,
int  dir 
)
private
double BiDirAStar::gethcost ( int  node_id,
int  dir 
)
private

Definition at line 117 of file src/BiDirAStar.cpp.

References dist(), m_lEndNodeId, m_lStartNodeId, and m_vecNodeVector.

Referenced by explore().

double BiDirAStar::gethcost ( int  node_id,
int  dir 
)
private
void BiDirAStar::init ( )
private

Definition at line 47 of file src/BiDirAStar.cpp.

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

Definition at line 130 of file src/BiDirAStar.cpp.

References m_pFCost, and m_pRCost.

Referenced by explore().

void BiDirAStar::setcost ( int  node_id,
int  dir,
double  c 
)
private
void BiDirAStar::setparent ( int  node_id,
int  dir,
int  parnode,
int  paredge 
)
private

Definition at line 138 of file src/BiDirAStar.cpp.

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

Referenced by explore().

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

Member Data Documentation

int BiDirAStar::m_lEndNodeId
private

Definition at line 116 of file src/BiDirAStar.h.

Referenced by bidir_astar(), and gethcost().

int BiDirAStar::m_lStartNodeId
private

Definition at line 115 of file src/BiDirAStar.h.

Referenced by bidir_astar(), and gethcost().

Long2LongMap BiDirAStar::m_mapEdgeId2Index
private

Definition at line 110 of file src/BiDirAStar.h.

Referenced by addEdge().

Long2LongVectorMap BiDirAStar::m_mapNodeId2Edge
private

Definition at line 111 of file src/BiDirAStar.h.

int BiDirAStar::m_MidNode
private

Definition at line 119 of file src/BiDirAStar.h.

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

double BiDirAStar::m_MinCost
private

Definition at line 118 of file src/BiDirAStar.h.

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

double * BiDirAStar::m_pFCost
private

Definition at line 123 of file src/BiDirAStar.h.

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

PARENT_PATH * BiDirAStar::m_pFParent
private

Definition at line 121 of file src/BiDirAStar.h.

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

double * BiDirAStar::m_pRCost
private

Definition at line 124 of file src/BiDirAStar.h.

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

PARENT_PATH * BiDirAStar::m_pRParent
private

Definition at line 122 of file src/BiDirAStar.h.

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

GraphEdgeVector BiDirAStar::m_vecEdgeVector
private

Definition at line 109 of file src/BiDirAStar.h.

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

GraphNodeVector BiDirAStar::m_vecNodeVector
private

Definition at line 112 of file src/BiDirAStar.h.

Referenced by addEdge(), bidir_astar(), construct_graph(), explore(), gethcost(), and initall().

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

Definition at line 120 of file src/BiDirAStar.h.

Referenced by bidir_astar(), fconstruct_path(), and rconstruct_path().

int BiDirAStar::max_edge_id
private

Definition at line 114 of file src/BiDirAStar.h.

Referenced by addEdge(), and bidir_astar().

int BiDirAStar::max_node_id
private

Definition at line 113 of file src/BiDirAStar.h.

Referenced by addEdge(), and bidir_astar().


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