PGROUTING  2.6
pgrouting::trsp::EdgeInfo Class Reference

#include "edgeInfo.h"

Collaboration diagram for pgrouting::trsp::EdgeInfo:

Public Member Functions

 EdgeInfo ()=default
 
 EdgeInfo (pgr_edge_t edgeIn, size_t edgeIndex)
 
void connect_endEdge (size_t edge_idx)
 
void connect_startEdge (size_t edge_idx)
 
double cost () const
 
int64_t edgeID () const
 
std::vector< size_t > endConnectedEdge () const
 
int64_t endNode () const
 
double get_cost (int64_t node) const
 
std::vector< size_t > get_idx (bool isStart) const
 
size_t idx () const
 
double r_cost () const
 
std::vector< size_t > startConnectedEdge () const
 
int64_t startNode () const
 

Private Attributes

pgr_edge_t m_edge
 
size_t m_edgeIndex
 
std::vector< size_t > m_endConnectedEdge
 
std::vector< size_t > m_startConnectedEdge
 

Detailed Description

Definition at line 39 of file edgeInfo.h.

Constructor & Destructor Documentation

pgrouting::trsp::EdgeInfo::EdgeInfo ( )
default
pgrouting::trsp::EdgeInfo::EdgeInfo ( pgr_edge_t  edgeIn,
size_t  edgeIndex 
)

Definition at line 32 of file edgeInfo.cpp.

34  :
35  m_edge(edgeIn),
36  m_edgeIndex(edgeIndex),
39 
40  {}
std::vector< size_t > m_startConnectedEdge
Definition: edgeInfo.h:92
std::vector< size_t > m_endConnectedEdge
Definition: edgeInfo.h:93

Member Function Documentation

void pgrouting::trsp::EdgeInfo::connect_endEdge ( size_t  edge_idx)
inline

Definition at line 67 of file edgeInfo.h.

References m_endConnectedEdge.

Referenced by pgrouting::trsp::Pgr_trspHandler::connectEndEdge(), and pgrouting::trsp::Pgr_trspHandler::connectStartEdge().

67  {
68  m_endConnectedEdge.push_back(edge_idx);
69  }
std::vector< size_t > m_endConnectedEdge
Definition: edgeInfo.h:93

Here is the caller graph for this function:

void pgrouting::trsp::EdgeInfo::connect_startEdge ( size_t  edge_idx)
inline

Definition at line 70 of file edgeInfo.h.

References m_startConnectedEdge.

Referenced by pgrouting::trsp::Pgr_trspHandler::connectEndEdge(), and pgrouting::trsp::Pgr_trspHandler::connectStartEdge().

70  {
71  m_startConnectedEdge.push_back(edge_idx);
72  }
std::vector< size_t > m_startConnectedEdge
Definition: edgeInfo.h:92

Here is the caller graph for this function:

double pgrouting::trsp::EdgeInfo::cost ( ) const
inline
int64_t pgrouting::trsp::EdgeInfo::edgeID ( ) const
inline

Definition at line 57 of file edgeInfo.h.

References pgr_edge_t::id, and m_edge.

Referenced by pgrouting::trsp::Pgr_trspHandler::getRestrictionCost().

57 {return m_edge.id;}
int64_t id
Definition: pgr_edge_t.h:59

Here is the caller graph for this function:

std::vector<size_t> pgrouting::trsp::EdgeInfo::endConnectedEdge ( ) const
inline

Definition at line 74 of file edgeInfo.h.

References m_endConnectedEdge.

Referenced by get_idx().

74  {
75  return m_endConnectedEdge;
76  }
std::vector< size_t > m_endConnectedEdge
Definition: edgeInfo.h:93

Here is the caller graph for this function:

int64_t pgrouting::trsp::EdgeInfo::endNode ( ) const
inline

Definition at line 53 of file edgeInfo.h.

References m_edge, pgassert, and pgr_edge_t::target.

Referenced by pgrouting::trsp::Pgr_trspHandler::connectEndEdge(), pgrouting::trsp::Pgr_trspHandler::connectStartEdge(), pgrouting::trsp::Pgr_trspHandler::dijkstra_exploration(), get_cost(), and pgrouting::trsp::Pgr_trspHandler::initialize_que().

53  {
54  pgassert(m_edge.target >= 0);
55  return m_edge.target;}
int64_t target
Definition: pgr_edge_t.h:61
#define pgassert(expr)
Uses the standard assert syntax.
Definition: pgr_assert.h:81

Here is the caller graph for this function:

double pgrouting::trsp::EdgeInfo::get_cost ( int64_t  node) const
inline

Definition at line 60 of file edgeInfo.h.

References cost(), endNode(), pgassert, r_cost(), and startNode().

60  {
61  pgassert(node == startNode() || node == endNode());
62  return node == startNode() ?
63  cost() :
64  r_cost();
65  }
double cost() const
Definition: edgeInfo.h:58
int64_t endNode() const
Definition: edgeInfo.h:53
#define pgassert(expr)
Uses the standard assert syntax.
Definition: pgr_assert.h:81
int64_t startNode() const
Definition: edgeInfo.h:49
double r_cost() const
Definition: edgeInfo.h:59

Here is the call graph for this function:

std::vector<size_t> pgrouting::trsp::EdgeInfo::get_idx ( bool  isStart) const
inline

Definition at line 82 of file edgeInfo.h.

References endConnectedEdge(), and startConnectedEdge().

Referenced by pgrouting::trsp::Pgr_trspHandler::explore().

82  {
83  return isStart ?
86  }
std::vector< size_t > startConnectedEdge() const
Definition: edgeInfo.h:78
std::vector< size_t > endConnectedEdge() const
Definition: edgeInfo.h:74

Here is the call graph for this function:

Here is the caller graph for this function:

size_t pgrouting::trsp::EdgeInfo::idx ( ) const
inline

Definition at line 47 of file edgeInfo.h.

References m_edgeIndex.

Referenced by pgrouting::trsp::Pgr_trspHandler::addEdge(), pgrouting::trsp::Pgr_trspHandler::explore(), and pgrouting::trsp::Pgr_trspHandler::initialize_que().

47 {return m_edgeIndex;}

Here is the caller graph for this function:

double pgrouting::trsp::EdgeInfo::r_cost ( ) const
inline
std::vector<size_t> pgrouting::trsp::EdgeInfo::startConnectedEdge ( ) const
inline

Definition at line 78 of file edgeInfo.h.

References m_startConnectedEdge.

Referenced by get_idx().

78  {
79  return m_startConnectedEdge;
80  }
std::vector< size_t > m_startConnectedEdge
Definition: edgeInfo.h:92

Here is the caller graph for this function:

int64_t pgrouting::trsp::EdgeInfo::startNode ( ) const
inline

Definition at line 49 of file edgeInfo.h.

References m_edge, pgassert, and pgr_edge_t::source.

Referenced by pgrouting::trsp::Pgr_trspHandler::connectEndEdge(), pgrouting::trsp::Pgr_trspHandler::connectStartEdge(), pgrouting::trsp::Pgr_trspHandler::dijkstra_exploration(), get_cost(), and pgrouting::trsp::Pgr_trspHandler::initialize_que().

49  {
50  pgassert(m_edge.source >= 0);
51  return m_edge.source;
52  }
int64_t source
Definition: pgr_edge_t.h:60
#define pgassert(expr)
Uses the standard assert syntax.
Definition: pgr_assert.h:81

Here is the caller graph for this function:

Member Data Documentation

pgr_edge_t pgrouting::trsp::EdgeInfo::m_edge
private

Definition at line 90 of file edgeInfo.h.

Referenced by cost(), edgeID(), endNode(), r_cost(), and startNode().

size_t pgrouting::trsp::EdgeInfo::m_edgeIndex
private

Definition at line 91 of file edgeInfo.h.

Referenced by idx().

std::vector<size_t> pgrouting::trsp::EdgeInfo::m_endConnectedEdge
private

Definition at line 93 of file edgeInfo.h.

Referenced by connect_endEdge(), and endConnectedEdge().

std::vector<size_t> pgrouting::trsp::EdgeInfo::m_startConnectedEdge
private

Definition at line 92 of file edgeInfo.h.

Referenced by connect_startEdge(), and startConnectedEdge().


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