DIMACS format
[Input-Output]


Detailed Description

Tools to read a graph from or write it to a file in DIMACS format data


Files

file  dimacs.h
 DIMACS file format reader.

Functions

template<typename Graph , typename LowerMap , typename CapacityMap , typename CostMap , typename SupplyMap >
void readDimacs (std::istream &is, Graph &g, LowerMap &lower, CapacityMap &capacity, CostMap &cost, SupplyMap &supply)
template<typename Graph , typename CapacityMap >
void readDimacs (std::istream &is, Graph &g, CapacityMap &capacity, typename Graph::Node &s, typename Graph::Node &t)
template<typename Graph , typename CapacityMap >
void readDimacs (std::istream &is, Graph &g, CapacityMap &capacity, typename Graph::Node &s)
template<typename Graph , typename CapacityMap >
void readDimacs (std::istream &is, Graph &g, CapacityMap &capacity)
template<typename Graph >
void readDimacs (std::istream &is, Graph &g)
template<typename Graph >
void writeDimacs (std::ostream &os, const Graph &g)

Function Documentation

void lemon::readDimacs ( std::istream &  is,
Graph g,
LowerMap &  lower,
CapacityMap &  capacity,
CostMap &  cost,
SupplyMap &  supply 
) [inline]

DIMACS min cost flow reader function.

This function reads a min cost flow instance from DIMACS format, i.e. from DIMACS files having a line starting with

   p min
At the beginning g is cleared by g.clear(). The supply amount of the nodes are written to supply (signed). The lower bounds, capacities and costs of the edges are written to lower, capacity and cost.

Author:
Marton Makai and Peter Kovacs

void lemon::readDimacs ( std::istream &  is,
Graph g,
CapacityMap &  capacity,
typename Graph::Node &  s,
typename Graph::Node &  t 
) [inline]

DIMACS max flow reader function.

This function reads a max flow instance from DIMACS format, i.e. from DIMACS files having a line starting with

   p max
At the beginning g is cleared by g.clear(). The edge capacities are written to capacity and s and t are set to the source and the target nodes.

Author:
Marton Makai

void lemon::readDimacs ( std::istream &  is,
Graph g,
CapacityMap &  capacity,
typename Graph::Node &  s 
) [inline]

DIMACS shortest path reader function.

This function reads a shortest path instance from DIMACS format, i.e. from DIMACS files having a line starting with

   p sp
At the beginning g is cleared by g.clear(). The edge capacities are written to capacity and s is set to the source node.

Author:
Marton Makai

void lemon::readDimacs ( std::istream &  is,
Graph g,
CapacityMap &  capacity 
) [inline]

DIMACS capacitated graph reader function.

This function reads an edge capacitated graph instance from DIMACS format. At the beginning g is cleared by g.clear() and the edge capacities are written to capacity.

Author:
Marton Makai

void lemon::readDimacs ( std::istream &  is,
Graph g 
) [inline]

DIMACS plain graph reader function.

This function reads a graph without any designated nodes and maps from DIMACS format, i.e. from DIMACS files having a line starting with

   p mat
At the beginning g is cleared by g.clear().

Author:
Marton Makai

void lemon::writeDimacs ( std::ostream &  os,
const Graph g 
) [inline]

DIMACS plain graph writer function.

This function writes a graph without any designated nodes and maps into DIMACS format, i.e. into DIMACS file having a line starting with

   p mat

Author:
Marton Makai


Generated on Thu Jun 4 04:03:13 2009 for LEMON by  doxygen 1.5.9