Merge
authorAlpar Juttner <alpar@cs.elte.hu>
Thu, 10 Jul 2008 16:13:50 +0200
changeset 202a5ee729dc1e1
parent 200 c0e2c043c060
parent 201 9757e3d9bfeb
child 203 215bfc30b14f
child 204 77d56a21c3ab
Merge
     1.1 --- a/doc/lgf.dox	Thu Jul 10 16:05:56 2008 +0200
     1.2 +++ b/doc/lgf.dox	Thu Jul 10 16:13:50 2008 +0200
     1.3 @@ -78,10 +78,18 @@
     1.4   2   3   18
     1.5  \endcode
     1.6  
     1.7 -The \c \@edges is just a synonym of \c \@arcs.
     1.8 +The \c \@edges is just a synonym of \c \@arcs. The @arcs section can
     1.9 +also store the edge set of an undirected graph. In such case there is
    1.10 +a conventional method for store arc maps in the file, if two columns
    1.11 +has the same caption with \c '+' and \c '-' prefix, then these columns
    1.12 +can be regarded as the values of an arc map.
    1.13  
    1.14  The \c \@attributes section contains key-value pairs, each line
    1.15 -consists of two tokens, an attribute name, and then an attribute value.
    1.16 +consists of two tokens, an attribute name, and then an attribute
    1.17 +value. The value of the attribute could be also a label value of a
    1.18 +node or an edge, or even an edge label prefixed with \c '+' or \c '-',
    1.19 +which regards to the forward or backward directed arc of the
    1.20 +corresponding edge.
    1.21  
    1.22  \code
    1.23   @attributes
     2.1 --- a/lemon/lgf_reader.h	Thu Jul 10 16:05:56 2008 +0200
     2.2 +++ b/lemon/lgf_reader.h	Thu Jul 10 16:13:50 2008 +0200
     2.3 @@ -1226,6 +1226,12 @@
     2.4    /// It can be used almost the same way as \c DigraphReader.
     2.5    /// The only difference is that this class can handle edges and
     2.6    /// edge maps as well as arcs and arc maps.
     2.7 +  ///
     2.8 +  /// The columns in the \c \@edges (or \c \@arcs) section are the
     2.9 +  /// edge maps. However, if there are two maps with the same name
    2.10 +  /// prefixed with \c '+' and \c '-', then these can be read into an
    2.11 +  /// arc map.  Similarly, an attribute can be read into an arc, if
    2.12 +  /// it's value is an edge label prefixed with \c '+' or \c '-'.
    2.13    template <typename _Graph>
    2.14    class GraphReader {
    2.15    public:
     3.1 --- a/lemon/lgf_writer.h	Thu Jul 10 16:05:56 2008 +0200
     3.2 +++ b/lemon/lgf_writer.h	Thu Jul 10 16:13:50 2008 +0200
     3.3 @@ -914,6 +914,12 @@
     3.4    /// It can be used almost the same way as \c DigraphWriter.
     3.5    /// The only difference is that this class can handle edges and
     3.6    /// edge maps as well as arcs and arc maps.
     3.7 +  ///
     3.8 +  /// The arc maps are written into the file as two columns, the
     3.9 +  /// caption of the columns are the name of the map prefixed with \c
    3.10 +  /// '+' and \c '-'. The arcs are written into the \c \@attributes
    3.11 +  /// section as a \c '+' or a \c '-' prefix (depends on the direction
    3.12 +  /// of the arc) and the label of corresponding edge.
    3.13    template <typename _Graph>
    3.14    class GraphWriter {
    3.15    public: