maxflow_pp Class Reference

[Index] [Hierarchy] [Headers]


Maximum flow algorithm (Malhotra, Kumar, Maheshwari). More...

#include <GTL/maxflow_pp.h>

Inherits: algorithm

Public Members


maxflow_pp() [public]

Default constructor. Enables only the calculation of maximum flow.

See Also:
algorithm::algorithm

~maxflow_pp() [public virtual]

Destructor.

See Also:
algorithm::~algorithm

void set_vars(const edge_map<double>& edge_capacity) [public]

Sets capacity of every edge for maximum flow calculation where artificial start-node and end_node will be computed automatically.

Parameters:
edge_capacity capacity of every edge.

void set_vars( const edge_map<double>& edge_capacity, const node& net_source, const node& net_target) [public]

Sets capacity of every edge for maximum flow calculation

Parameters:
net_source start-node.
edge_capacity capacity of every edge.
net_target end-node.

int check(graph& G) [public virtual]

Checks whether following preconditions are satisfied:

Parameters:
G graph
Returns:
algorithm::GTL_OK on success algorithm::GTL_ERROR otherwise
See Also:
algorithm::check

int run(graph& G) [public]

Computes maximum flow of graph G.

Parameters:
G graph
Returns:
algorithm::GTL_OK on success algorithm::GTL_ERROR otherwise
See Also:
algorithm::run

double get_max_flow(const edge& e) const [public]

Returns the maximum flow of an edge.

Parameters:
e edge of a graph G
Returns:
maximum flow value.

double get_max_flow() const [public]

Returns the maximum flow of the whole graph G.

Returns:
maximum flow value.

double get_rem_cap(const edge& e) const [public]

Returns the remaining free capacity of an edge.

Parameters:
e edge of a graph G
Returns:
remaining capacity.

void reset() [public virtual]

Resets maximum flow algorithm, i.e. prepares the algorithm to be applied to another graph.

See Also:
algorithm::reset

Kdoc