[][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.

  1. empty lines are allowed and ignored
  2. a line starting with c is a comment line and is ignored
  3. 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.
  4. after the problem line there must follow exactly two node lines of the form n <node> <type> where <node> is the node number between 1..n and <type> is either s (if this is the source node) or t (if this is the sink node).
  5. after the node lines there must be exactly m arc lines a <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.