- Main Page
- Modules
- Classes
- Namespaces
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Member Functions
GomoryHu< GR, CAP >::MinCutEdgeIt Class Reference

## Detailed Description

### template<typename GR, typename CAP>
class lemon::GomoryHu< GR, CAP >::MinCutEdgeIt

This iterator class lists the edges of a minimum cut found by GomoryHu. Before using it, you must allocate a GomoryHu class and call its run() method.

This example computes the value of the minimum cut separating `s` from `t`.

* GomoryHu<Graph> gom(g, capacities);
* gom.run();
* int value=0;
* for(GomoryHu<Graph>::MinCutEdgeIt e(gom,s,t); e!=INVALID; ++e)
* value+=capacities[e];
*

The result will be the same as the value returned by gom.minCutValue(s,t).

`#include <lemon/gomory_hu.h>`

## Public Member Functions
| MinCutEdgeIt (GomoryHu const &gomory, const Node &s, const Node &t, bool side=true)
| Constructor. More...
| operator typename Graph::Arc () const
| Conversion to `Arc`. More...
| operator typename Graph::Edge () const
| Conversion to `Edge`. More...
MinCutEdgeIt & | operator++ ()
| Next edge. More...
Graph::Arc | operator++ (int)
| Postfix incrementation. More...

## Constructor & Destructor Documentation

MinCutEdgeIt | ( | 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 listed arcs will be oriented from the nodes of the component containing `s`, otherwise they will be oriented in the opposite direction.

## Member Function Documentation

operator typename Graph::Arc | ( |  | ) | const
| inline

Conversion to `Arc`.

operator typename Graph::Edge | ( |  | ) | const
| inline

Conversion to `Edge`.

MinCutEdgeIt& operator++ | ( |  | ) |
| inline

Next edge.

Graph::Arc operator++ | ( | int |  | ) |
| inline

Postfix incrementation.

Warning
  This incrementation returns an `Arc`, not a `MinCutEdgeIt`, as one may expect.