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.

Classes

class  GraphReader
 The graph reader class. More...
class  UGraphReader
 The undirected graph reader class. More...
class  GraphWriter
 The graph writer class. More...
class  UGraphWriter
 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  UEdgeSetReader
 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  UEdgeReader
 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  UEdgeSetWriter
 SectionWriter for writing a undirected edgeset. More...
class  NodeWriter
 SectionWriter for writing named nodes. More...
class  EdgeWriter
 SectionWriter for writing named edges. More...
class  UEdgeWriter
 SectionWriter for writing named undirected edges. More...
class  AttributeWriter
 SectionWriter for attributes. More...

Functions

template<typename Graph>
GraphReader< Graphlemon::graphReader (std::istream &is, Graph &g)
 Read a graph from the input.
template<typename Graph>
GraphReader< Graphlemon::graphReader (const std::string &fn, Graph &g)
 Read a graph from the input.
template<typename Graph>
UGraphReader< Graphlemon::uGraphReader (std::istream &is, Graph &g)
 Read an undirected graph from the input.
template<typename Graph>
UGraphReader< Graphlemon::uGraphReader (const std::string &fn, Graph &g)
 Read an undirected graph from the input.
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<class G>
GraphToEps< DefaultGraphToEpsTraits<
G > > 
lemon::graphToEps (G &g, const std::string &file_name)
 Generates an EPS file from a graph.
template<typename Graph>
GraphWriter< Graphlemon::graphWriter (std::ostream &os, const Graph &g)
 Write a graph to the output.
template<typename Graph>
GraphWriter< Graphlemon::graphWriter (const std::string &fn, const Graph &g)
 Write a graph to the output.
template<typename Graph>
UGraphWriter< Graphlemon::uGraphWriter (std::ostream &os, const Graph &g)
 Write an undirected graph to the output.
template<typename Graph>
UGraphWriter< Graphlemon::uGraphWriter (const std::string &fn, const Graph &g)
 Write an undirected graph to the output.


Function Documentation

GraphReader<Graph> lemon::graphReader std::istream &  is,
Graph g
 

It is a helper function to read a graph from the given input stream. It gives back an GraphReader object and this object can read more maps, labeled nodes, edges and attributes.

Warning:
Do not forget to call the run() function.
Parameters:
is The input stream.
g The graph.

GraphReader<Graph> lemon::graphReader const std::string &  fn,
Graph g
 

It is a helper function to read a graph from the given input file. It gives back an GraphReader object and this object can read more maps, labeled nodes, edges and attributes.

Warning:
Do not forget to call the run() function.
Parameters:
fn The input filename.
g The graph.

UGraphReader<Graph> lemon::uGraphReader std::istream &  is,
Graph g
 

It is a helper function to read an undirected graph from the given input stream. It gives back an UGraphReader object and this object can read more maps, labeled nodes, edges, undirected edges and attributes.

Warning:
Do not forget to call the run() function.
Parameters:
is The input stream.
g The graph.

UGraphReader<Graph> lemon::uGraphReader const std::string &  fn,
Graph g
 

It is a helper function to read an undirected graph from the given input file. It gives back an UGraphReader object and this object can read more maps, labeled nodes, edges, undirected edges and attributes.

Warning:
Do not forget to call the run() function.
Parameters:
fn The input filename.
g The graph.

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)

GraphToEps<DefaultGraphToEpsTraits<G> > lemon::graphToEps G &  g,
const std::string &  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)

GraphWriter<Graph> lemon::graphWriter std::ostream &  os,
const Graph g
 

It is a helper function to write a graph to the given output stream. It gives back a GraphWriter object and this object can write more maps, labeled nodes and edges and attributes.

Warning:
Do not forget to call the run() function.
Parameters:
os The output stream.
g The graph.

GraphWriter<Graph> lemon::graphWriter const std::string &  fn,
const Graph g
 

It is a helper function to write a graph to the given output file. It gives back a GraphWriter object and this object can write more maps, labeled nodes and edges and attributes.

Warning:
Do not forget to call the run() function.
Parameters:
fn The filename.
g The graph.

UGraphWriter<Graph> lemon::uGraphWriter std::ostream &  os,
const Graph g
 

It is a helper function to write an undirected graph to the given output stream. It gives back an UGraphWriter object and this object can write more maps, labeled nodes and edges and attributes.

Warning:
Do not forget to call the run() function.
Parameters:
os The output stream.
g The graph.

UGraphWriter<Graph> lemon::uGraphWriter const std::string &  fn,
const Graph g
 

It is a helper function to write an undirected graph to the given output file. It gives back an UGraphWriter object and this object can write more maps, labeled nodes, edges, undirected edges and attributes.

Warning:
Do not forget to call the run() function.
Parameters:
fn The output file.
g The graph.


Generated on Fri Feb 3 18:40:01 2006 for LEMON by  doxygen 1.4.6