3rdParty/boost/1.78.0/libs/graph/doc/write_dimacs.html
//outputs a graph with including edge_capacity properties to an std::ostream
template < typename Graph, typename CapacityMap, typename IndexMap >
void write_dimacs_max_flow(Graph& g,
CapacityMap capacity,
IndexMap idx,
typename graph_traits::vertex\_descriptor& src, typename graph\_traits::vertex\_descriptor& sink, std::ostream& out)
This method writes a BGL graph object as an max-flow problem into an output stream in extended dimacs format (see Goldbergs site for more information). The output can be read in again using the boost/graph/read_dimacs.hpp method.
IN: Graph& g
A directed or undirected graph. The graph's type must be a model of VertexListGraph and EdgeListGraph, as num_vertices(Graph) and num_edges(Graph) is used inside. [1]
IN: CapacityMap capacity
A property map that models Readable Property Map whose key type is the edge descriptor of the graph and whose value type can be written to a stream.
IN: IndexMap epw
A property map that models Readable Property Map whose key type is the vertex descriptor of the graph and whose value type can be written to a stream.
OUT: std::ostream& out
A standard std::ostream object.
A short example which uses read_dimacs and write_dimacs is located in the examples directory.
[1] As num_edges() and num_vertices() is used inside which returns values for the unfiltered graph (instead of the filtered), this method cannot be used with a filtered_graphSee filtered_graph Note [2] for the reason.