Home | Documentation | Download | Platforms | Projects | Mailing Lists | Version History
Public Member Functions | |
maxflow_sap () | |
virtual | ~maxflow_sap () |
void | set_vars (const edge_map< double > &edge_capacity) |
void | set_vars (const edge_map< double > &edge_capacity, const node &net_source, const node &net_target) |
virtual int | check (graph &G) |
int | run (graph &G) |
double | get_max_flow (const edge &e) const |
double | get_max_flow () const |
double | get_rem_cap (const edge &e) const |
virtual void | reset () |
This class implements a maximum flow algorithm with shortest augmenting paths due to Ahuja and Orlin.
In the case V is the set of vertices and E is the set of edges of the graph, the algorithm needs O(|V| * |V| * |E|) time to proceed.
maxflow_sap::maxflow_sap | ( | ) |
virtual maxflow_sap::~maxflow_sap | ( | ) | [virtual] |
void maxflow_sap::set_vars | ( | const edge_map< double > & | edge_capacity | ) |
virtual int maxflow_sap::check | ( | graph & | G | ) | [virtual] |
Checks whether following preconditions are satisfied:
G
is directed. G
is connected. G
has at least one edge and two nodes.
G | graph |
algorithm::GTL_OK
on success algorithm::GTL_ERROR
otherwise Implements algorithm.
int maxflow_sap::run | ( | graph & | G | ) | [virtual] |
Computes maximum flow of graph G
.
G | graph |
algorithm::GTL_OK
on success algorithm::GTL_ERROR
otherwise Implements algorithm.
double maxflow_sap::get_max_flow | ( | const edge & | e | ) | const |
double maxflow_sap::get_max_flow | ( | ) | const |
double maxflow_sap::get_rem_cap | ( | const edge & | e | ) | const |
virtual void maxflow_sap::reset | ( | ) | [virtual] |
Resets maximum flow algorithm, i.e. prepares the algorithm to be applied to another graph.
Implements algorithm.
University of Passau - FMI - Theoretical Computer Science