* This file is a part of LEMON, a generic C++ optimization library
* Copyright (C) 2003-2008
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
* (Egervary Research Group on Combinatorial Optimization, EGRES).
* Permission to use, modify and distribute this software is granted
* provided that this copyright notice appears in all copies. For
* precise terms see the accompanying LICENSE file.
* This software is provided "AS IS" with no warranty of any kind,
* express or implied, and with no claim as to its suitability for any
\page lgf-format Lemon Graph Format (LGF)
The \e LGF is a <em>column oriented</em>
file format for storing graphs and associated data like
Each line with \c '#' first non-whitespace
character is considered as a comment line.
Otherwise the file consists of sections starting with
a header line. The header lines starts with an \c '@' character followed by the
type of section. The standard section types are \c \@nodes, \c
and \@attributes. Each header line may also have an optional
\e name, which can be use to distinguish the sections of the same
The standard sections are column oriented, each line consists of
<em>token</em>s separated by whitespaces. A token can be \e plain or
\e quoted. A plain token is just a sequence of non-whitespace characters,
while a quoted token is a
character sequence surrounded by double quotes, and it can also
contain whitespaces and escape sequences.
The \c \@nodes section describes a set of nodes and associated
maps. The first is a header line, it columns are the names of the
maps appearing in the following lines.
One of the maps must be called \c
"label", which plays special role in the file.
non-empty lines until the next section describes nodes of the
graph. Each line contains the values of the node maps
associated to the current node.
label coordinates size title
1 (10,20) 10 "First node"
2 (80,80) 8 "Second node"
3 (40,10) 10 "Third node"
The \c \@arcs section is very similar to the \c \@nodes section,
it again starts with a header line describing the names of the arc,
but the \c "label" map is not obligatory here. The following lines
describe the arcs. The first two tokens of each line are
the source and the target node of the arc, respectively, then come the map
values. The source and target tokens must be node labels.
The \c \@edges is just a synonym of \c \@arcs.
The \c \@attributes section contains key-value pairs, each line
consists of two tokens, an attribute name, and then an attribute value.
caption "LEMON test digraph"
// LocalWords: whitespace whitespaces