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 CapacityMap, typename CostMap>
void readDimacs (std::istream &is, Graph &g, CapacityMap &capacity, typename Graph::Node &s, typename Graph::Node &t, CostMap &cost)
 Dimacs min cost flow reader function.
template<typename Graph, typename CapacityMap>
void readDimacs (std::istream &is, Graph &g, CapacityMap &capacity, typename Graph::Node &s, typename Graph::Node &t)
 Dimacs max flow reader function.
template<typename Graph, typename CapacityMap>
void readDimacs (std::istream &is, Graph &g, CapacityMap &capacity, typename Graph::Node &s)
 Dimacs shortest path reader function.
template<typename Graph, typename CapacityMap>
void readDimacs (std::istream &is, Graph &g, CapacityMap &capacity)
 Dimacs capacitated graph reader function.
template<typename Graph>
void readDimacs (std::istream &is, Graph &g)
 Dimacs plain graph reader function.
template<typename Graph>
void writeDimacs (std::ostream &os, const Graph &g)
 write matching problem


Function Documentation

void lemon::readDimacs ( std::istream &  is,
Graph g,
CapacityMap &  capacity,
typename Graph::Node &  s,
typename Graph::Node &  t,
CostMap &  cost 
)

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 edge capacities are written to capacity, s and t are set to the source and the target nodes resp. and the cost of the edges are written to cost.

Author:
Marton Makai

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

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 
)

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 
)

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 
)

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


Generated on Tue Oct 31 09:49:38 2006 for LEMON by  doxygen 1.5.1