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

#include "basePath_SSEC.hpp"

Public Member Functions

 Path ()
 
 Path (int64_t s_id, int64_t e_id)
 
 Path (const Path &)=default
 
template<typename G , typename V >
 Path (G &graph, V v_source, double distance, const std::vector< V > &predecessors, const std::vector< double > &distances)
 
template<typename G , typename V >
 Path (const G &graph, const V v_source, const V v_target, const std::vector< V > &predecessors, const std::vector< double > &distances, bool only_cost, bool normal=true)
 
void append (const Path &other)
 Path: 2 -> 9 seq node edge cost agg_cost 0 2 4 1 0 1 5 8 1 1 2 6 9 1 2 3 9 -1 0 3 Path: 9 -> 3 seq node edge cost agg_cost 0 9 16 1 0 1 4 3 1 1 2 3 -1 0 2 Path: 2 -> 3 seq node edge cost agg_cost 0 2 4 1 0 1 5 8 1 1 2 6 9 1 2 3 9 16 1 3 4 4 3 1 4 5 3 -1 0 5. More...
 
void appendPath (const Path &o_path)
 
const Path_tback () const
 
Path_tback ()
 
pthIt begin ()
 
ConstpthIt begin () const
 
void clear ()
 
template<typename G , typename V >
void complete_path (const G &graph, const V v_source, const V v_target, const std::vector< V > &predecessors, const std::vector< double > &distances, bool normal)
 constructs a path based on results More...
 
bool empty () const
 
void empty_path (unsigned int d_vertex)
 
pthIt end ()
 
ConstpthIt end () const
 
int64_t end_id () const
 
void end_id (int64_t value)
 
void erase (pthIt pos)
 
const Path_tfront () const
 
Path_tfront ()
 
void generate_postgres_data (General_path_element_t **postgres_data, size_t &sequence) const
 
void get_pg_dd_path (General_path_element_t **ret_path, size_t &sequence) const
 
void get_pg_ksp_path (General_path_element_t **ret_path, size_t &sequence, int routeId) const
 
Path getSubpath (unsigned int j) const
 
bool isEqual (const Path &subpath) const
 
const Path_toperator[] (size_t i) const
 
Path_toperator[] (size_t i)
 
void push_back (Path_t data)
 
void push_front (Path_t data)
 
void push_front (int64_t d_vertex, int64_t d_edge, double d_cost, double d_tot_cost)
 
void reverse ()
 
Path_t set_data (int64_t d_from, int64_t d_to, int64_t d_vertex, int64_t d_edge, double d_cost, double d_tot_cost)
 
size_t size () const
 
int64_t start_id () const
 
void start_id (int64_t value)
 
double tot_cost () const
 

Private Types

typedef std::deque< Path_t >
::const_iterator 
ConstpthIt
 
typedef std::deque< Path_t >
::iterator 
pthIt
 

Private Attributes

int64_t m_end_id
 
int64_t m_start_id
 
double m_tot_cost
 
std::deque< Path_tpath
 

Friends

size_t collapse_paths (General_path_element_t **ret_path, const std::deque< Path > &paths)
 
size_t count_tuples (const std::deque< Path > &paths)
 
void equi_cost (std::deque< Path > &paths)
 
std::ostream & operator<< (std::ostream &log, const Path &p)
 

Detailed Description

Definition at line 42 of file basePath_SSEC.hpp.

Member Typedef Documentation

typedef std::deque< Path_t >::const_iterator Path::ConstpthIt
private

Definition at line 44 of file basePath_SSEC.hpp.

typedef std::deque< Path_t >::iterator Path::pthIt
private

Definition at line 43 of file basePath_SSEC.hpp.

Constructor & Destructor Documentation

Path::Path ( )
inline

Definition at line 53 of file basePath_SSEC.hpp.

Path::Path ( int64_t  s_id,
int64_t  e_id 
)
inline

Definition at line 54 of file basePath_SSEC.hpp.

Path::Path ( const Path )
default
template<typename G , typename V >
Path::Path ( G &  graph,
v_source,
double  distance,
const std::vector< V > &  predecessors,
const std::vector< double > &  distances 
)
inline

Definition at line 218 of file basePath_SSEC.hpp.

References push_back().

template<typename G , typename V >
Path::Path ( const G &  graph,
const V  v_source,
const V  v_target,
const std::vector< V > &  predecessors,
const std::vector< double > &  distances,
bool  only_cost,
bool  normal = true 
)
inline

Definition at line 240 of file basePath_SSEC.hpp.

References complete_path(), and push_front().

Member Function Documentation

void Path::append ( const Path other)

Path: 2 -> 9 seq node edge cost agg_cost 0 2 4 1 0 1 5 8 1 1 2 6 9 1 2 3 9 -1 0 3 Path: 9 -> 3 seq node edge cost agg_cost 0 9 16 1 0 1 4 3 1 1 2 3 -1 0 2 Path: 2 -> 3 seq node edge cost agg_cost 0 2 4 1 0 1 5 8 1 1 2 6 9 1 2 3 9 16 1 3 4 4 3 1 4 5 3 -1 0 5.

Definition at line 141 of file basePath_SSEC.cpp.

References m_end_id, m_start_id, path, pgassert, and push_back().

Referenced by Pgr_bdDijkstra< G >::bidir_dijkstra().

void Path::appendPath ( const Path o_path)

Definition at line 112 of file basePath_SSEC.cpp.

References m_tot_cost, and path.

Referenced by Pgr_ksp< G >::doNextCycle().

const Path_t& Path::back ( ) const
inline

Definition at line 79 of file basePath_SSEC.hpp.

References path.

Path_t& Path::back ( )
inline

Definition at line 80 of file basePath_SSEC.hpp.

References path.

pthIt Path::begin ( )
inline

Definition at line 72 of file basePath_SSEC.hpp.

References path.

Referenced by isEqual().

ConstpthIt Path::begin ( ) const
inline

Definition at line 74 of file basePath_SSEC.hpp.

References path.

void Path::clear ( )

Definition at line 65 of file basePath_SSEC.cpp.

References m_end_id, m_start_id, m_tot_cost, and path.

Referenced by process_dijkstra().

template<typename G , typename V >
void Path::complete_path ( const G &  graph,
const V  v_source,
const V  v_target,
const std::vector< V > &  predecessors,
const std::vector< double > &  distances,
bool  normal 
)
inline

constructs a path based on results

Normal = false for reversed search path like in pgr_bdDijkstra

Definition at line 276 of file basePath_SSEC.hpp.

References push_front().

Referenced by Path().

bool Path::empty ( void  ) const
inline
void Path::empty_path ( unsigned int  d_vertex)
pthIt Path::end ( )
inline

Definition at line 73 of file basePath_SSEC.hpp.

References path.

Referenced by isEqual().

ConstpthIt Path::end ( ) const
inline

Definition at line 75 of file basePath_SSEC.hpp.

References path.

void Path::end_id ( int64_t  value)
inline

Definition at line 61 of file basePath_SSEC.hpp.

References m_end_id.

void Path::erase ( pthIt  pos)
inline

Definition at line 78 of file basePath_SSEC.hpp.

References path.

const Path_t& Path::front ( ) const
inline

Definition at line 81 of file basePath_SSEC.hpp.

References path.

Path_t& Path::front ( )
inline

Definition at line 82 of file basePath_SSEC.hpp.

References path.

void Path::generate_postgres_data ( General_path_element_t **  postgres_data,
size_t &  sequence 
) const

Definition at line 169 of file basePath_SSEC.cpp.

References end_id(), path, and start_id().

Referenced by do_pgr_bdDijkstra().

void Path::get_pg_dd_path ( General_path_element_t **  ret_path,
size_t &  sequence 
) const

Definition at line 182 of file basePath_SSEC.cpp.

References path, and start_id().

void Path::get_pg_ksp_path ( General_path_element_t **  ret_path,
size_t &  sequence,
int  routeId 
) const

Definition at line 198 of file basePath_SSEC.cpp.

References end_id(), and path.

Path Path::getSubpath ( unsigned int  j) const

Definition at line 89 of file basePath_SSEC.cpp.

References end_id(), path, pgassert, push_back(), start_id(), and tot_cost().

bool Path::isEqual ( const Path subpath) const

Definition at line 101 of file basePath_SSEC.cpp.

References begin(), empty(), end(), path, and size().

const Path_t& Path::operator[] ( size_t  i) const
inline

Definition at line 69 of file basePath_SSEC.hpp.

References path.

Path_t& Path::operator[] ( size_t  i)
inline

Definition at line 70 of file basePath_SSEC.hpp.

References path.

void Path::push_back ( Path_t  data)
void Path::push_front ( Path_t  data)

Definition at line 34 of file basePath_SSEC.cpp.

References Path_t::cost, m_tot_cost, and path.

Referenced by complete_path(), and Path().

void Path::push_front ( int64_t  d_vertex,
int64_t  d_edge,
double  d_cost,
double  d_tot_cost 
)
void Path::reverse ( )

Definition at line 44 of file basePath_SSEC.cpp.

References m_end_id, m_start_id, and path.

Referenced by Pgr_bdDijkstra< G >::bidir_dijkstra().

Path_t Path::set_data ( int64_t  d_from,
int64_t  d_to,
int64_t  d_vertex,
int64_t  d_edge,
double  d_cost,
double  d_tot_cost 
)
size_t Path::size ( ) const
inline
void Path::start_id ( int64_t  value)
inline

Definition at line 59 of file basePath_SSEC.hpp.

References m_start_id.

double Path::tot_cost ( ) const
inline

Definition at line 62 of file basePath_SSEC.hpp.

References m_tot_cost.

Referenced by getSubpath(), Pgr_ksp< G >::compPaths::operator()(), and process_dijkstra().

Friends And Related Function Documentation

size_t collapse_paths ( General_path_element_t **  ret_path,
const std::deque< Path > &  paths 
)
friend

Definition at line 125 of file basePath_SSEC.hpp.

size_t count_tuples ( const std::deque< Path > &  paths)
friend

Definition at line 209 of file basePath_SSEC.hpp.

void equi_cost ( std::deque< Path > &  paths)
friend

Definition at line 152 of file basePath_SSEC.hpp.

std::ostream& operator<< ( std::ostream &  log,
const Path p 
)
friend

Definition at line 72 of file basePath_SSEC.cpp.

Member Data Documentation

int64_t Path::m_end_id
private

Definition at line 49 of file basePath_SSEC.hpp.

Referenced by append(), clear(), end_id(), and reverse().

int64_t Path::m_start_id
private

Definition at line 48 of file basePath_SSEC.hpp.

Referenced by append(), clear(), reverse(), and start_id().

double Path::m_tot_cost
private

Definition at line 50 of file basePath_SSEC.hpp.

Referenced by appendPath(), clear(), push_back(), push_front(), and tot_cost().


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