PGROUTING
3.2
|
#include "pgr_maxflow.hpp"
Public Member Functions | |
PgrFlowGraph (const std::vector< pgr_edge_t > &edges, const std::set< int64_t > &source_vertices, const std::set< int64_t > &sink_vertices, bool directed) | |
PgrFlowGraph (const std::vector< pgr_edge_t > &edges, const std::set< int64_t > &source_vertices, const std::set< int64_t > &sink_vertices, int algorithm) | |
int64_t | boykov_kolmogorov () |
std::vector< General_path_element_t > | edge_disjoint_paths () |
int64_t | edmonds_karp () |
std::vector< General_path_element_t > | get_edge_disjoint_paths (size_t flow) |
std::vector< pgr_flow_t > | get_flow_edges () const |
int64_t | push_relabel () |
Private Types | |
typedef boost::graph_traits< FlowGraph >::edge_descriptor | E |
typedef boost::graph_traits< FlowGraph >::edge_iterator | E_it |
typedef boost::graph_traits< FlowGraph >::out_edge_iterator | Eout_it |
typedef boost::graph_traits< FlowGraph >::vertex_descriptor | V |
typedef boost::graph_traits< FlowGraph >::vertex_iterator | V_it |
Private Member Functions | |
template<typename T > | |
void | add_vertices (const T &edges, const std::set< int64_t > &source_vertices, const std::set< int64_t > &sink_vertices) |
void | flow_dfs (V vertex, size_t path_id, std::vector< std::vector< int64_t > > &paths) |
V | get_boost_vertex (int64_t id) const |
int64_t | get_edge_id (E e) const |
int64_t | get_vertex_id (V v) const |
void | insert_edges (const std::vector< pgr_edge_t > &edges) |
void | insert_edges_edge_disjoint (const std::vector< pgr_edge_t > &edges, bool directed) |
void | insert_edges_push_relabel (const std::vector< pgr_edge_t > &edges) |
void | set_supersink (const std::set< int64_t > &sink_vertices) |
void | set_supersource (const std::set< int64_t > &source_vertices) |
Private Attributes | |
boost::property_map< FlowGraph, boost::edge_capacity_t >::type | capacity |
std::map< E, int64_t > | E_to_id |
FlowGraph | graph |
std::map< int64_t, V > | id_to_V |
boost::property_map< FlowGraph, boost::edge_residual_capacity_t >::type | residual_capacity |
boost::property_map< FlowGraph, boost::edge_reverse_t >::type | rev |
V | supersink |
V | supersource |
std::map< V, int64_t > | V_to_id |
Definition at line 55 of file pgr_maxflow.hpp.
|
private |
Definition at line 57 of file pgr_maxflow.hpp.
|
private |
Definition at line 59 of file pgr_maxflow.hpp.
|
private |
Definition at line 60 of file pgr_maxflow.hpp.
|
private |
Definition at line 56 of file pgr_maxflow.hpp.
|
private |
Definition at line 58 of file pgr_maxflow.hpp.
pgrouting::graph::PgrFlowGraph::PgrFlowGraph | ( | const std::vector< pgr_edge_t > & | edges, |
const std::set< int64_t > & | source_vertices, | ||
const std::set< int64_t > & | sink_vertices, | ||
int | algorithm | ||
) |
Definition at line 38 of file pgr_maxflow.cpp.
References add_vertices(), capacity, graph, insert_edges(), insert_edges_push_relabel(), residual_capacity, and rev.
pgrouting::graph::PgrFlowGraph::PgrFlowGraph | ( | const std::vector< pgr_edge_t > & | edges, |
const std::set< int64_t > & | source_vertices, | ||
const std::set< int64_t > & | sink_vertices, | ||
bool | directed | ||
) |
Definition at line 56 of file pgr_maxflow.cpp.
References add_vertices(), capacity, graph, insert_edges_edge_disjoint(), residual_capacity, and rev.
|
inlineprivate |
Definition at line 162 of file pgr_maxflow.hpp.
References graph, id_to_V, set_supersink(), set_supersource(), and V_to_id.
Referenced by PgrFlowGraph().
|
inline |
Definition at line 90 of file pgr_maxflow.hpp.
References graph, supersink, and supersource.
Referenced by do_pgr_max_flow().
|
inline |
Definition at line 99 of file pgr_maxflow.hpp.
References get_edge_disjoint_paths(), graph, supersink, and supersource.
|
inline |
Definition at line 81 of file pgr_maxflow.hpp.
References graph, supersink, and supersource.
Referenced by do_pgr_max_flow().
|
private |
Definition at line 228 of file pgr_maxflow.cpp.
References capacity, get_vertex_id(), graph, residual_capacity, and supersink.
Referenced by get_edge_disjoint_paths().
|
inlineprivate |
Definition at line 128 of file pgr_maxflow.hpp.
References id_to_V.
Referenced by get_edge_disjoint_paths(), insert_edges(), insert_edges_edge_disjoint(), insert_edges_push_relabel(), set_supersink(), and set_supersource().
std::vector< General_path_element_t > pgrouting::graph::PgrFlowGraph::get_edge_disjoint_paths | ( | size_t | flow | ) |
Definition at line 254 of file pgr_maxflow.cpp.
References capacity, flow_dfs(), get_boost_vertex(), get_edge_id(), get_vertex_id(), graph, residual_capacity, and supersource.
Referenced by edge_disjoint_paths().
|
inlineprivate |
Definition at line 136 of file pgr_maxflow.hpp.
References E_to_id.
Referenced by get_edge_disjoint_paths(), and get_flow_edges().
std::vector< pgr_flow_t > pgrouting::graph::PgrFlowGraph::get_flow_edges | ( | ) | const |
Definition at line 204 of file pgr_maxflow.cpp.
References capacity, get_edge_id(), get_vertex_id(), graph, residual_capacity, edge::source, supersink, supersource, and edge::target.
Referenced by do_pgr_max_flow().
|
inlineprivate |
Definition at line 132 of file pgr_maxflow.hpp.
References V_to_id.
Referenced by flow_dfs(), get_edge_disjoint_paths(), and get_flow_edges().
|
private |
Definition at line 109 of file pgr_maxflow.cpp.
References capacity, edge::cost, E_to_id, get_boost_vertex(), graph, edge::id, rev, edge::reverse_cost, edge::source, and edge::target.
Referenced by PgrFlowGraph().
|
private |
Definition at line 132 of file pgr_maxflow.cpp.
References capacity, edge::cost, E_to_id, get_boost_vertex(), graph, edge::id, rev, edge::reverse_cost, edge::source, and edge::target.
Referenced by PgrFlowGraph().
|
private |
Definition at line 74 of file pgr_maxflow.cpp.
References capacity, edge::cost, E_to_id, get_boost_vertex(), graph, edge::id, rev, edge::reverse_cost, edge::source, and edge::target.
Referenced by PgrFlowGraph().
|
inline |
Definition at line 72 of file pgr_maxflow.hpp.
References graph, supersink, and supersource.
Referenced by do_pgr_max_flow().
|
private |
Definition at line 181 of file pgr_maxflow.cpp.
References capacity, get_boost_vertex(), graph, rev, and supersink.
Referenced by add_vertices().
|
private |
Definition at line 161 of file pgr_maxflow.cpp.
References capacity, get_boost_vertex(), graph, rev, and supersource.
Referenced by add_vertices().
|
private |
Definition at line 64 of file pgr_maxflow.hpp.
Referenced by flow_dfs(), get_edge_disjoint_paths(), get_flow_edges(), insert_edges(), insert_edges_edge_disjoint(), insert_edges_push_relabel(), PgrFlowGraph(), set_supersink(), and set_supersource().
|
private |
Definition at line 188 of file pgr_maxflow.hpp.
Referenced by get_edge_id(), insert_edges(), insert_edges_edge_disjoint(), and insert_edges_push_relabel().
|
private |
Definition at line 185 of file pgr_maxflow.hpp.
Referenced by add_vertices(), boykov_kolmogorov(), edge_disjoint_paths(), edmonds_karp(), flow_dfs(), get_edge_disjoint_paths(), get_flow_edges(), insert_edges(), insert_edges_edge_disjoint(), insert_edges_push_relabel(), PgrFlowGraph(), push_relabel(), set_supersink(), and set_supersource().
|
private |
Definition at line 186 of file pgr_maxflow.hpp.
Referenced by add_vertices(), and get_boost_vertex().
|
private |
Definition at line 68 of file pgr_maxflow.hpp.
Referenced by flow_dfs(), get_edge_disjoint_paths(), get_flow_edges(), and PgrFlowGraph().
|
private |
Definition at line 66 of file pgr_maxflow.hpp.
Referenced by insert_edges(), insert_edges_edge_disjoint(), insert_edges_push_relabel(), PgrFlowGraph(), set_supersink(), and set_supersource().
|
private |
Definition at line 196 of file pgr_maxflow.hpp.
Referenced by boykov_kolmogorov(), edge_disjoint_paths(), edmonds_karp(), flow_dfs(), get_flow_edges(), push_relabel(), and set_supersink().
|
private |
Definition at line 195 of file pgr_maxflow.hpp.
Referenced by boykov_kolmogorov(), edge_disjoint_paths(), edmonds_karp(), get_edge_disjoint_paths(), get_flow_edges(), push_relabel(), and set_supersource().
|
private |
Definition at line 187 of file pgr_maxflow.hpp.
Referenced by add_vertices(), and get_vertex_id().