Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Miscellaneous Tools


Detailed Description

Here you can find several useful tools for development, debugging and testing.


Files

file  bezier.h
 Classes to compute with Bezier curves.
file  dimacs.h
 Dimacs file format reader.
file  graph_to_eps.h
 Simple graph drawer.
file  time_measure.h
 Tools for measuring cpu usage.
file  xy.h
 A simple two dimensional vector and a bounding box implementation.
file  test_tools.h
 Some utility to write test programs.

Classes

class  Color
 Data structure representing RGB colors. More...
class  TimeStamp
 A class to store (cpu)time instances. More...
class  Timer
 Class measuring the cpu time and real time usage of the process. More...
class  xy
 A two dimensional vector (plainvector) implementation. More...
class  BoundingBox
 A class to calculate or store the bounding box of plainvectors. More...

Functions

template<typename Graph, typename CapacityMap, typename CostMap>
void lemon::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 lemon::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 lemon::readDimacs (std::istream &is, Graph &g, CapacityMap &capacity, typename Graph::Node &s)
 Dimacs shortest path reader function.
template<typename Graph, typename CapacityMap>
void lemon::readDimacs (std::istream &is, Graph &g, CapacityMap &capacity)
 Dimacs capacitated graph reader function.
template<typename Graph>
void lemon::readDimacs (std::istream &is, Graph &g)
 Dimacs plain graph reader function.
template<typename Graph>
void lemon::writeDimacs (std::ostream &os, const Graph &g)
 write matching problem
template<class G>
GraphToEps< DefaultGraphToEpsTraits<
G > > 
lemon::graphToEps (G &g, std::ostream &os=std::cout)
 Generates an EPS file from a graph.
template<class G>
GraphToEps< DefaultGraphToEpsTraits<
G > > 
lemon::graphToEps (G &g, const char *file_name)
 Generates an EPS file from a graph.
xy< T > lemon::xy::operator * (const T &u, const xy< T > &x)
 Returns a vector multiplied by a scalar.
std::istream & lemon::xy::operator>> (std::istream &is, xy< T > &z)
 Read a plainvector from a stream.
std::ostream & lemon::xy::operator<< (std::ostream &os, xy< T > z)
 Write a plainvector to a stream.


Function Documentation

void 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

Definition at line 49 of file dimacs.h.

void 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

Definition at line 128 of file dimacs.h.

Here is the call graph for this function:

void 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

Definition at line 148 of file dimacs.h.

Here is the call graph for this function:

void 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

Definition at line 163 of file dimacs.h.

Here is the call graph for this function:

void 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

Definition at line 183 of file dimacs.h.

Here is the call graph for this function:

GraphToEps<DefaultGraphToEpsTraits<G> > graphToEps G &  g,
std::ostream &  os = std::cout
 

Generates an EPS file from a graph.

Parameters:
g is a reference to the graph to be printed
os is a reference to the output stream. By default it is std::cout
This function also has a lot of named parameters, they are declared as the members of class GraphToEps. The following example shows how to use these parameters.
    graphToEps(g).scale(10).coords(coords)
                 .nodeScale(2).nodeSizes(sizes)
                 .edgeWidthScale(.4).run();
Warning:
Don't forget to put the run() to the end of the parameter list.
See also:
GraphToEps

graphToEps(G &g, char *file_name)

Definition at line 789 of file graph_to_eps.h.

GraphToEps<DefaultGraphToEpsTraits<G> > graphToEps G &  g,
const char *  file_name
 

This function does the same as graphToEps(G &g,std::ostream& os) but it writes its output into the file file_name instead of a stream.

See also:
graphToEps(G &g, std::ostream& os)

Definition at line 805 of file graph_to_eps.h.

xy< T > operator * const T &  u,
const xy< T > &  x
[related, inherited]
 

Returns a vector multiplied by a scalar

Definition at line 152 of file xy.h.

std::istream & operator>> std::istream &  is,
xy< T > &  z
[related, inherited]
 

Read a plainvector from a stream

Definition at line 163 of file xy.h.

std::ostream & operator<< std::ostream &  os,
xy< T >  z
[related, inherited]
 

Write a plainvector to a stream

Definition at line 177 of file xy.h.


Generated on Mon Feb 21 15:02:29 2005 for LEMON by  doxygen 1.4.1