[−][src]Module rs_graph::dimacs::maxflow
This module implements a read function for the famous DIMACS max flow format. A DIMACS file must look as follows.
- empty lines are allowed and ignored
- a line starting with
c
is a comment line and is ignored - the first non-comment line must have the form
p max <n> <m>
, where<n>
is an integer > 0 denoting the number of nodes and<m>
an integer > 0 denoting the number of arcs. - after the problem line there must follow exactly two node lines
of the form
n <node> <type>
where<node>
is the node number between1..n
and<type>
is eithers
(if this is the source node) ort
(if this is the sink node). - after the node lines there must be exactly
m
arc linesa <u> <v> <c>
denoting the source and sink nodes of an arc as well as the arcs capacity<c>
(an integer >= 0).
Structs
Instance | A maxflow instance. |