# `read_dimacs_max_flow`

    //reads a graph with attached edge_capacity properties from an std::istream
    template <class Graph, class CapacityMap, class ReverseEdgeMap>
    int read_dimacs_max_flow(Graph& g,
                             CapacityMap capacity,
                             ReverseEdgeMap reverse_edge,
                             typename graph_traits::vertex_descriptor& src,
                             typename graph_traits::vertex_descriptor& sink,
                             std::istream& in=std::cin)

This method reads a BGL graph object from a max-flow problem description in extended dimacs format. (see `Goldbergs site` for more information). For each edge found in the file an additional reverse_edge is added and set in the reverse_edge map. Source- and sink-vertex-descriptors are set according to the dimacs file.

### Where Defined

`boost/graph/read_dimacs.hpp`

### Parameters

IN: `Graph& g`

> A directed or undirected graph. The graph's type must be a model of IncidenceGraph.

OUT: `CapacityMap capacity`

> A property map that models mutable Lvalue Property Map whose key type is the edge descriptor of the graph.

OUT: `ReverseEdgeMap reverse_edge`

> A property map that models mutable Lvalue Property Map whose key and value type is the edge descriptor of the graph. This map stores the corresponding reverse edge for each each in Graph g.

IN: `std::istream& in`

> A standard `std::istream` object.
> Default: `std::cin (for backward compatibility)`

### Example

A short example which uses read_dimacs and write_dimacs is located in the examples directory.

### See Also

`write_dimacs`