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) |
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
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
.
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
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.
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
g
is cleared by g.clear()
. The edge capacities are written to capacity
and s
is set to the source node.
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
.
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
g
is cleared by g.clear()
.
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