PGROUTING
3.2
|
#include "basePath_SSEC.hpp"
Public Member Functions | |
Path () | |
template<typename G > | |
Path (const G &graph, const Path &original, bool only_cost) | |
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) | |
Path (const Path &)=default | |
template<typename G , typename V > | |
Path (G &graph, int64_t source, double distance, const std::vector< V > &predecessors, const std::vector< double > &distances) | |
template<typename G , typename V > | |
Path (G &graph, V v_source, double distance, const std::vector< V > &predecessors, const std::vector< double > &distances) | |
Path (int64_t s_id, int64_t e_id) | |
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) |
Path_t & | back () |
const Path_t & | back () const |
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... | |
size_t | countInfinityCost () const |
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) |
ConstpthIt | find_restriction (const pgrouting::trsp::Rule &rule) const |
get the iterator of the path where the (restriction) rule starts More... | |
Path_t & | front () |
const Path_t & | front () const |
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 |
void | get_pg_turn_restricted_path (General_path_element_t **ret_path, size_t &sequence, int routeId) const |
Path | getSubpath (unsigned int j) const |
bool | has_restriction (const pgrouting::trsp::Rule &rule) const |
Path | inf_cost_on_restriction (const pgrouting::trsp::Rule &rule) |
bool | isEqual (const Path &subpath) const |
Path_t & | operator[] (size_t i) |
const Path_t & | operator[] (size_t i) const |
void | push_back (Path_t data) |
void | push_front (int64_t d_vertex, int64_t d_edge, double d_cost, double d_tot_cost) |
void | push_front (Path_t data) |
void | recalculate_agg_cost () |
Path & | renumber_vertices (int64_t value) |
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 |
void | sort_by_node_agg_cost () |
Sorts a path by node, aggcost ascending. More... | |
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_t > | path |
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) |
counts the tuples to be returned More... | |
void | equi_cost (std::deque< Path > &paths) |
discards common vertices with greater agg_cost More... | |
std::ostream & | operator<< (std::ostream &log, const Path &p) |
Definition at line 47 of file basePath_SSEC.hpp.
|
private |
Definition at line 49 of file basePath_SSEC.hpp.
|
private |
Definition at line 48 of file basePath_SSEC.hpp.
|
inline |
Definition at line 58 of file basePath_SSEC.hpp.
|
inline |
Definition at line 60 of file basePath_SSEC.hpp.
|
default |
|
inline |
|
inline |
Definition at line 183 of file basePath_SSEC.hpp.
References m_end_id, m_tot_cost, path, push_back(), and recalculate_agg_cost().
|
inline |
|
inline |
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 192 of file basePath_SSEC.cpp.
References m_end_id, m_start_id, path, pgassert, and push_back().
Referenced by pgrouting::bidirectional::Pgr_bidirectional< G >::bidirectional().
void Path::appendPath | ( | const Path & | o_path | ) |
Definition at line 164 of file basePath_SSEC.cpp.
References path, and recalculate_agg_cost().
Referenced by pgrouting::yen::Pgr_ksp< G >::doNextCycle().
|
inline |
|
inline |
|
inline |
Definition at line 81 of file basePath_SSEC.hpp.
References path.
Referenced by pgrouting::functions::Pgr_binaryBreadthFirstSearch< G >::getPath(), pgrouting::functions::Pgr_edwardMoore< G >::getPath(), and isEqual().
|
inline |
void Path::clear | ( | ) |
Definition at line 87 of file basePath_SSEC.cpp.
References m_end_id, m_start_id, m_tot_cost, and path.
Referenced by pgrouting::trsp::Pgr_trspHandler::clear().
|
inline |
constructs a path based on results
Normal = false for reversed search path like in pgr_bdDijkstra
Definition at line 282 of file basePath_SSEC.hpp.
References push_front().
Referenced by Path().
size_t Path::countInfinityCost | ( | ) | const |
|
inline |
Definition at line 72 of file basePath_SSEC.hpp.
References path.
Referenced by pgrouting::Pg_points_graph::adjust_pids(), pgrouting::Pg_points_graph::eliminate_details(), pgrouting::Pg_points_graph::eliminate_details_dd(), pgrouting::yen::Pgr_ksp< G >::getFirstSolution(), isEqual(), pgrouting::yen::Pgr_turnRestrictedPath< G >::Myvisitor::on_insert_first_solution(), pgrouting::yen::Pgr_turnRestrictedPath< G >::Myvisitor::on_insert_to_heap(), and pgRouting::pgr_dijkstraVia().
void Path::empty_path | ( | unsigned int | d_vertex | ) |
|
inline |
Definition at line 82 of file basePath_SSEC.hpp.
References path.
Referenced by pgrouting::functions::Pgr_binaryBreadthFirstSearch< G >::getPath(), pgrouting::functions::Pgr_edwardMoore< G >::getPath(), and isEqual().
|
inline |
|
inline |
Definition at line 67 of file basePath_SSEC.hpp.
References m_end_id.
Referenced by pgrouting::Pg_points_graph::adjust_pids(), do_pgr_withPoints(), pgrouting::Pg_points_graph::eliminate_details(), pgrouting::Pg_points_graph::eliminate_details_dd(), generate_postgres_data(), get_pg_ksp_path(), get_pg_turn_restricted_path(), getSubpath(), operator<<(), and pgrouting::trsp::Pgr_trspHandler::process_trsp().
|
inline |
|
inline |
Path::ConstpthIt Path::find_restriction | ( | const pgrouting::trsp::Rule & | rule | ) | const |
get the iterator of the path where the (restriction) rule starts
[in] | rule | A subpath of edges for turn restrictions |
Definition at line 94 of file basePath_SSEC.cpp.
References pgrouting::trsp::Rule::begin(), pgrouting::trsp::Rule::end(), and path.
Referenced by has_restriction().
|
inline |
|
inline |
void Path::generate_postgres_data | ( | General_path_element_t ** | postgres_data, |
size_t & | sequence | ||
) | const |
void Path::get_pg_dd_path | ( | General_path_element_t ** | ret_path, |
size_t & | sequence | ||
) | const |
void Path::get_pg_ksp_path | ( | General_path_element_t ** | ret_path, |
size_t & | sequence, | ||
int | routeId | ||
) | const |
Definition at line 255 of file basePath_SSEC.cpp.
void Path::get_pg_turn_restricted_path | ( | General_path_element_t ** | ret_path, |
size_t & | sequence, | ||
int | routeId | ||
) | const |
Definition at line 273 of file basePath_SSEC.cpp.
Path Path::getSubpath | ( | unsigned int | j | ) | const |
Definition at line 141 of file basePath_SSEC.cpp.
References end_id(), path, pgassert, push_back(), start_id(), and tot_cost().
Referenced by pgrouting::yen::Pgr_ksp< G >::doNextCycle().
bool Path::has_restriction | ( | const pgrouting::trsp::Rule & | rule | ) | const |
Definition at line 100 of file basePath_SSEC.cpp.
References find_restriction(), and path.
Referenced by pgrouting::yen::Pgr_turnRestrictedPath< G >::Myvisitor::has_restriction().
Path Path::inf_cost_on_restriction | ( | const pgrouting::trsp::Rule & | rule | ) |
Definition at line 105 of file basePath_SSEC.cpp.
References pgrouting::trsp::Rule::begin(), pgrouting::trsp::Rule::end(), and path.
bool Path::isEqual | ( | const Path & | subpath | ) | const |
Definition at line 153 of file basePath_SSEC.cpp.
|
inline |
|
inline |
void Path::push_back | ( | Path_t | data | ) |
Definition at line 52 of file basePath_SSEC.cpp.
References Path_t::cost, m_tot_cost, and path.
Referenced by append(), pgrouting::trsp::Pgr_trspHandler::construct_path(), pgrouting::Pgr_dijkstra< G >::drivingDistance_no_equicost(), pgrouting::Pg_points_graph::eliminate_details(), pgrouting::Pg_points_graph::eliminate_details_dd(), pgrouting::functions::Pgr_binaryBreadthFirstSearch< G >::getPath(), pgrouting::functions::Pgr_edwardMoore< G >::getPath(), getSubpath(), Path(), and pgrouting::trsp::Pgr_trspHandler::process_trsp().
void Path::push_front | ( | int64_t | d_vertex, |
int64_t | d_edge, | ||
double | d_cost, | ||
double | d_tot_cost | ||
) |
void Path::push_front | ( | Path_t | data | ) |
Definition at line 47 of file basePath_SSEC.cpp.
References Path_t::cost, m_tot_cost, and path.
Referenced by complete_path(), and Path().
void Path::recalculate_agg_cost | ( | ) |
Definition at line 77 of file basePath_SSEC.cpp.
References m_tot_cost, and path.
Referenced by appendPath(), pgrouting::yen::Pgr_ksp< G >::executeYen(), pgrouting::yen::Pgr_ksp< G >::getFirstSolution(), Path(), and detail::post_process().
Path & Path::renumber_vertices | ( | int64_t | value | ) |
Definition at line 38 of file basePath_SSEC.cpp.
References m_end_id, m_start_id, and path.
Referenced by pgrouting::trsp::Pgr_trspHandler::process_trsp().
void Path::reverse | ( | ) |
Definition at line 57 of file basePath_SSEC.cpp.
References m_end_id, m_start_id, and path.
Referenced by pgrouting::bidirectional::Pgr_bidirectional< G >::bidirectional(), pgr_astar(), and pgr_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 | ||
) |
|
inline |
Definition at line 71 of file basePath_SSEC.hpp.
References path.
Referenced by pgrouting::yen::Pgr_ksp< G >::doNextCycle(), pgrouting::Pg_points_graph::eliminate_details(), isEqual(), pgrouting::compPathsLess::operator()(), and pgRouting::pgr_dijkstraVia().
void Path::sort_by_node_agg_cost | ( | ) |
Sorts a path by node, aggcost ascending.
nodes ASC agg_cost ASC
Definition at line 295 of file basePath_SSEC.cpp.
References path.
|
inline |
Definition at line 65 of file basePath_SSEC.hpp.
References m_start_id.
Referenced by pgrouting::Pg_points_graph::adjust_pids(), pgrouting::trsp::Pgr_trspHandler::construct_path(), pgrouting::Pg_points_graph::eliminate_details(), pgrouting::Pg_points_graph::eliminate_details_dd(), generate_postgres_data(), get_pg_dd_path(), getSubpath(), operator<<(), and pgrouting::trsp::Pgr_trspHandler::process_trsp().
|
inline |
|
inline |
Definition at line 69 of file basePath_SSEC.hpp.
References m_tot_cost.
Referenced by getSubpath(), and pgrouting::compPathsLess::operator()().
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 118 of file basePath_SSEC.cpp.
|
private |
Definition at line 54 of file basePath_SSEC.hpp.
Referenced by append(), clear(), end_id(), Path(), renumber_vertices(), and reverse().
|
private |
Definition at line 53 of file basePath_SSEC.hpp.
Referenced by append(), clear(), renumber_vertices(), reverse(), and start_id().
|
private |
Definition at line 55 of file basePath_SSEC.hpp.
Referenced by clear(), Path(), push_back(), push_front(), recalculate_agg_cost(), and tot_cost().
|
private |
Definition at line 52 of file basePath_SSEC.hpp.
Referenced by append(), appendPath(), back(), begin(), clear(), countInfinityCost(), empty(), end(), erase(), find_restriction(), front(), generate_postgres_data(), get_pg_dd_path(), get_pg_ksp_path(), get_pg_turn_restricted_path(), getSubpath(), has_restriction(), inf_cost_on_restriction(), isEqual(), operator[](), Path(), push_back(), push_front(), recalculate_agg_cost(), renumber_vertices(), reverse(), size(), and sort_by_node_agg_cost().