This iterator class lists the nodes of a minimum cut found by GomoryHu. Before using it, you must allocate a GomoryHu class and call its run() method.
This example counts the nodes in the minimum cut separating s
from t
.
GomoryHu<Graph> gom(g, capacities); gom.run(); int cnt=0; for(GomoryHu<Graph>::MinCutNodeIt n(gom,s,t); n!=INVALID; ++n) ++cnt;
#include <lemon/gomory_hu.h>
Public Member Functions | |
MinCutNodeIt (GomoryHu const &gomory, const Node &s, const Node &t, bool side=true) | |
operator typename Graph::Node () const | |
MinCutNodeIt & | operator++ () |
Graph::Node | operator++ (int) |
Postfix incrementation. |
MinCutNodeIt | ( | GomoryHu const & | gomory, |
const Node & | s, | ||
const Node & | t, | ||
bool | side = true |
||
) | [inline] |
Constructor.
gomory | The GomoryHu class. You must call its run() method before initializing this iterator. |
s | The base node. |
t | The node you want to separate from node s . |
side | If it is true (default) then the iterator lists the nodes of the component containing s , otherwise it lists the other component. |
MinCutNodeIt(gomory, s, t, true);
MinCutNodeIt(gomory, t, s, false);
MinCutNodeIt(gomory, s, t, true);
MinCutNodeIt(gomory, s, t, false);
operator typename Graph::Node | ( | ) | const [inline] |
Conversion to Node
.
MinCutNodeIt& operator++ | ( | ) | [inline] |
Next node.
Graph::Node operator++ | ( | int | ) | [inline] |
Postfix incrementation.
Node
, not a MinCutNodeIt
, as one may expect.