1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/doc/lgf.dox Sat May 17 06:30:02 2008 +0100
1.3 @@ -0,0 +1,96 @@
1.4 +/* -*- C++ -*-
1.5 + *
1.6 + * This file is a part of LEMON, a generic C++ optimization library
1.7 + *
1.8 + * Copyright (C) 2003-2008
1.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 + *
1.12 + * Permission to use, modify and distribute this software is granted
1.13 + * provided that this copyright notice appears in all copies. For
1.14 + * precise terms see the accompanying LICENSE file.
1.15 + *
1.16 + * This software is provided "AS IS" with no warranty of any kind,
1.17 + * express or implied, and with no claim as to its suitability for any
1.18 + * purpose.
1.19 + *
1.20 + */
1.21 +
1.22 +namespace lemon {
1.23 +/*!
1.24 +
1.25 +
1.26 +
1.27 +\page lgf-format Lemon Graph Format (LGF)
1.28 +
1.29 +The \e LGF is a <em>column oriented</em>
1.30 +file format for storing graphs and associated data like
1.31 +node and edge maps.
1.32 +
1.33 +Each line with \c '#' first non-whitespace
1.34 +character is considered as a comment line.
1.35 +
1.36 +Otherwise the file consists of sections starting with
1.37 +a header line. The header lines starts with an \c '@' character followed by the
1.38 +type of section. The standard section types are \c \@nodes, \c
1.39 +\@arcs and \c \@edges
1.40 +and \@attributes. Each header line may also have an optional
1.41 +\e name, which can be use to distinguish the sections of the same
1.42 +type.
1.43 +
1.44 +The standard sections are column oriented, each line consists of
1.45 +<em>token</em>s separated by whitespaces. A token can be \e plain or
1.46 +\e quoted. A plain token is just a sequence of non-whitespace characters,
1.47 +while a quoted token is a
1.48 +character sequence surrounded by double quotes, and it can also
1.49 +contain whitespaces and escape sequences.
1.50 +
1.51 +The \c \@nodes section describes a set of nodes and associated
1.52 +maps. The first is a header line, it columns are the names of the
1.53 +maps appearing in the following lines.
1.54 +One of the maps must be called \c
1.55 +"label", which plays special role in the file.
1.56 +The following
1.57 +non-empty lines until the next section describes nodes of the
1.58 +graph. Each line contains the values of the node maps
1.59 +associated to the current node.
1.60 +
1.61 +\code
1.62 + @nodes
1.63 + label coordinates size title
1.64 + 1 (10,20) 10 "First node"
1.65 + 2 (80,80) 8 "Second node"
1.66 + 3 (40,10) 10 "Third node"
1.67 +\endcode
1.68 +
1.69 +The \c \@arcs section is very similar to the \c \@nodes section,
1.70 +it again starts with a header line describing the names of the arc,
1.71 +but the \c "label" map is not obligatory here. The following lines
1.72 +describe the arcs. The first two tokens of each line are
1.73 +the source and the target node of the arc, respectively, then come the map
1.74 +values. The source and target tokens must be node labels.
1.75 +
1.76 +\code
1.77 + @arcs
1.78 + capacity
1.79 + 1 2 16
1.80 + 1 3 12
1.81 + 2 3 18
1.82 +\endcode
1.83 +
1.84 +The \c \@edges is just a synonym of \c \@arcs.
1.85 +
1.86 +The \c \@attributes section contains key-value pairs, each line
1.87 +consists of two tokens, an attribute name, and then an attribute value.
1.88 +
1.89 +\code
1.90 + @attributes
1.91 + source 1
1.92 + target 3
1.93 + caption "LEMON test digraph"
1.94 +\endcode
1.95 +
1.96 +*/
1.97 +}
1.98 +
1.99 +// LocalWords: whitespace whitespaces