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

Input Output


Detailed Description

Here you can find tools for imporing and exporting graphs and graph related data


Files

file  graph_reader.h
 Lemon Graph Format reader.
file  graph_to_eps.h
 Simple graph drawer.
file  graph_writer.h
 Lemon Graph Format writer.
file  lemon_reader.h
 Lemon Format reader.
file  lemon_writer.h
 Lemon Format writer.

Modules

 DIMACS format
 Read and write files in DIMACS format.
 Item Readers and Writers
 Item Readers and Writers.

Classes

class  GraphReader
 The graph reader class. More...
class  UndirGraphReader
 The undir graph reader class. More...
class  GraphWriter
 The graph writer class. More...
class  UndirGraphWriter
 The undirected graph writer class. More...
class  LemonReader
 Lemon Format reader class. More...
class  NodeSetReader
 SectionReader for reading a graph's nodeset. More...
class  EdgeSetReader
 SectionReader for reading a graph's edgeset. More...
class  UndirEdgeSetReader
 SectionReader for reading a undirected graph's edgeset. More...
class  NodeReader
 SectionReader for reading labeled nodes. More...
class  EdgeReader
 SectionReader for reading labeled edges. More...
class  UndirEdgeReader
 SectionReader for reading labeled undirected edges. More...
class  AttributeReader
 SectionReader for attributes. More...
class  ContentReader
 SectionReader for retrieve what is in the file. More...
class  LemonWriter
 Lemon Format writer class. More...
class  NodeSetWriter
 SectionWriter for writing a graph's nodeset. More...
class  EdgeSetWriter
 SectionWriter for writing a graph's edgesets. More...
class  UndirEdgeSetWriter
 SectionWriter for writing a undirected edgeset. More...
class  NodeWriter
 SectionWriter for writing labeled nodes. More...
class  EdgeWriter
 SectionWriter for writing labeled edges. More...
class  UndirEdgeWriter
 SectionWriter for writing labeled undirected edges. More...
class  AttributeWriter
 SectionWriter for attributes. More...

Functions

template<typename Graph>
void lemon::readGraph (std::istream &is, Graph &g)
 Read a graph from an input stream.
template<typename Graph, typename CapacityMap>
void lemon::readGraph (std::istream &is, Graph &g, CapacityMap &capacity)
 Read a capacitated graph instance from an input stream.
template<typename Graph, typename CapacityMap>
void lemon::readGraph (std::istream &is, Graph &g, CapacityMap &capacity, typename Graph::Node &s)
 Read a shortest path instance from an input stream.
template<typename Graph, typename CapacityMap>
void lemon::readGraph (std::istream &is, Graph &g, CapacityMap &capacity, typename Graph::Node &s, typename Graph::Node &t)
 Read a max flow instance from an input stream.
template<typename Graph, typename CapacityMap, typename CostMap>
void lemon::readGraph (std::istream &is, Graph &g, CapacityMap &capacity, typename Graph::Node &s, typename Graph::Node &t, CostMap &cost)
 Read a min cost flow instance from an input stream.
template<typename Graph>
void lemon::readUndirGraph (std::istream &is, Graph &g)
 Read an undirected graph from an input stream.
template<typename Graph, typename CapacityMap>
void lemon::readUndirGraph (std::istream &is, Graph &g, CapacityMap &capacity)
 Read an undirected multigraph (undirected graph + capacity map on the edges) from an input stream.
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.
template<typename Graph>
void lemon::writeGraph (std::ostream &os, const Graph &g)
 Write a graph to the output.
template<typename Graph, typename CapacityMap>
void lemon::writeGraph (std::ostream &os, const Graph &g, const CapacityMap &capacity)
 Write a capacitated graph instance to the output.
template<typename Graph, typename CapacityMap>
void lemon::writeGraph (std::ostream &os, const Graph &g, const CapacityMap &capacity, const typename Graph::Node &s)
 Write a shortest path instance to the output.
template<typename Graph, typename CapacityMap>
void lemon::writeGraph (std::ostream &os, const Graph &g, const CapacityMap &capacity, const typename Graph::Node &s, const typename Graph::Node &t)
 Write a max flow instance to the output.
template<typename Graph, typename CapacityMap, typename CostMap>
void lemon::writeGraph (std::ostream &os, const Graph &g, const CapacityMap &capacity, const typename Graph::Node &s, const typename Graph::Node &t, const CostMap &cost)
 Write a min cost flow instance to the output.
template<typename Graph>
void lemon::writeUndirGraph (std::ostream &os, const Graph &g)
 Write an undirected graph to the output.
template<typename Graph, typename CapacityMap>
void lemon::writeUndirGraph (std::ostream &os, const Graph &g, const CapacityMap &capacity)
 Write an undirected multigraph (undirected graph + capacity map on the edges) to the output.


Function Documentation

void lemon::readGraph std::istream is,
Graph &  g
 

Read a graph from an input stream.

Parameters:
is The input stream.
g The graph.

void lemon::readGraph std::istream is,
Graph &  g,
CapacityMap &  capacity
 

Read a capacitated graph (graph+capacity on the edges) from an input stream.

Parameters:
is The input stream.
g The graph.
capacity The capacity map.

void lemon::readGraph std::istream is,
Graph &  g,
CapacityMap &  capacity,
typename Graph::Node &  s
 

Read a shortest path instance (graph+capacity on the edges+designated source) from an input stream.

Parameters:
is The input stream.
g The graph.
capacity The capacity map.
s The source node.

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

Read a max flow instance (graph+capacity on the edges+designated source and target) from an input stream.

Parameters:
is The input stream.
g The graph.
capacity The capacity map.
s The source node.
t The target node.

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

Read a min cost flow instance (graph+capacity on the edges+cost function on the edges+designated source and target) from an input stream.

Parameters:
is The input stream.
g The graph.
capacity The capacity map.
s The source node.
t The target node.
cost The cost map.

void lemon::readUndirGraph std::istream is,
Graph &  g
 

Read an undirected graph from an input stream.

Parameters:
is The input stream.
g The graph.

void lemon::readUndirGraph std::istream is,
Graph &  g,
CapacityMap &  capacity
 

Read an undirected multigraph (undirected graph + capacity map on the edges) from an input stream.

Parameters:
is The input stream.
g The graph.
capacity The capacity map.

GraphToEps<DefaultGraphToEpsTraits<G> > lemon::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,os).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, const char *file_name)

GraphToEps<DefaultGraphToEpsTraits<G> > lemon::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)

void lemon::writeGraph std::ostream os,
const Graph &  g
 

Write a graph to the output.

Parameters:
os The output stream.
g The graph.

void lemon::writeGraph std::ostream os,
const Graph &  g,
const CapacityMap &  capacity
 

Write a capacitated graph (graph+capacity on the edges) to the output.

Parameters:
os The output stream.
g The graph.
capacity The capacity map.

void lemon::writeGraph std::ostream os,
const Graph &  g,
const CapacityMap &  capacity,
const typename Graph::Node &  s
 

Write a shortest path instance (graph+capacity on the edges+designated source) to the output.

Parameters:
os The output stream.
g The graph.
capacity The capacity map.
s The source node.

void lemon::writeGraph std::ostream os,
const Graph &  g,
const CapacityMap &  capacity,
const typename Graph::Node &  s,
const typename Graph::Node &  t
 

Write a max flow instance (graph+capacity on the edges+designated source and target) to the output.

Parameters:
os The output stream.
g The graph.
capacity The capacity map.
s The source node.
t The target node.

void lemon::writeGraph std::ostream os,
const Graph &  g,
const CapacityMap &  capacity,
const typename Graph::Node &  s,
const typename Graph::Node &  t,
const CostMap &  cost
 

Write a min cost flow instance (graph+capacity on the edges+cost function on the edges+designated source and target) to the output.

Parameters:
os The output stream.
g The graph.
capacity The capacity map.
s The source node.
t The target node.
cost The cost map.

void lemon::writeUndirGraph std::ostream os,
const Graph &  g
 

Write an undirected graph to the output.

Parameters:
os The output stream.
g The graph.

void lemon::writeUndirGraph std::ostream os,
const Graph &  g,
const CapacityMap &  capacity
 

Write an undirected multigraph (undirected graph + capacity map on the edges) to the output.

Parameters:
os The output stream.
g The graph.
capacity The capacity undirected map.


Generated on Sat Aug 27 14:14:56 2005 for LEMON by  doxygen 1.4.4