Iterate on the nodes of a minimum cut.
More...
#include <lemon/gomory_hu.h>
template< typename GR , typename CAP >
class lemon::GomoryHu< GR , CAP >::MinCutNodeIt
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.
gom.run();
int cnt = 0;
++n )
++cnt;
Iterate on the nodes of a minimum cut.
Definition gomory_hu.h:394
GomoryHu( const Graph & graph , const Capacity & capacity )
Constructor.
Definition gomory_hu.h:121
const Invalid INVALID
Invalid iterators.
Definition base.cc:33
◆ MinCutNodeIt()
template< typename GR , typename CAP >
| MinCutNodeIt |
( |
GomoryHu const & | gomory, |
|
|
const Node & | s, |
|
|
const Node & | t, |
|
|
bool | side = true ) |
|
inline |
Constructor.
- Parameters
-
| 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. |
- Note
- As the minimum cut is not always unique,
MinCutNodeIt( GomoryHu const & gomory , const Node & s , const Node & t , bool side=true )
Constructor.
Definition gomory_hu.h:404
and does not necessarily give the same set of nodes. However, it is ensured that and together list each node exactly once.
◆ operator typename Graph::Node()
template< typename GR , typename CAP >
| operator typename Graph::Node |
( |
| ) |
const |
|
inline |
◆ operator++() [1/2]
template< typename GR , typename CAP >
◆ operator++() [2/2]
template< typename GR , typename CAP >
| Graph::Node operator++ |
( |
int | | ) |
|
|
inline |
Postfix incrementation.
- Warning
- This incrementation returns a
Node, not a MinCutNodeIt, as one may expect.