COIN-OR::LEMON - Graph Library

Ticket #93: 9757e3d9bfeb.patch

File 9757e3d9bfeb.patch, 2.7 KB (added by Balazs Dezso, 16 years ago)
  • doc/lgf.dox

    # HG changeset patch
    # User Balazs Dezso <deba@inf.elte.hu>
    # Date 1215694955 -7200
    # Node ID 9757e3d9bfebfbe7af6f4a9d8d7741e4ce8f1c4e
    # Parent  e80e08222fdf7808460dffd57a003b595d0098da
    More docs for undirected LGF IO
    
    diff -r e80e08222fdf -r 9757e3d9bfeb doc/lgf.dox
    a b  
    7878 2   3   18
    7979\endcode
    8080
    81 The \c \@edges is just a synonym of \c \@arcs.
     81The \c \@edges is just a synonym of \c \@arcs. The @arcs section can
     82also store the edge set of an undirected graph. In such case there is
     83a conventional method for store arc maps in the file, if two columns
     84has the same caption with \c '+' and \c '-' prefix, then these columns
     85can be regarded as the values of an arc map.
    8286
    8387The \c \@attributes section contains key-value pairs, each line
    84 consists of two tokens, an attribute name, and then an attribute value.
     88consists of two tokens, an attribute name, and then an attribute
     89value. The value of the attribute could be also a label value of a
     90node or an edge, or even an edge label prefixed with \c '+' or \c '-',
     91which regards to the forward or backward directed arc of the
     92corresponding edge.
    8593
    8694\code
    8795 @attributes
  • lemon/lgf_reader.h

    diff -r e80e08222fdf -r 9757e3d9bfeb lemon/lgf_reader.h
    a b  
    12261226  /// It can be used almost the same way as \c DigraphReader.
    12271227  /// The only difference is that this class can handle edges and
    12281228  /// edge maps as well as arcs and arc maps.
     1229  ///
     1230  /// The columns in the \c \@edges (or \c \@arcs) section are the
     1231  /// edge maps. However, if there are two maps with the same name
     1232  /// prefixed with \c '+' and \c '-', then these can be read into an
     1233  /// arc map.  Similarly, an attribute can be read into an arc, if
     1234  /// it's value is an edge label prefixed with \c '+' or \c '-'.
    12291235  template <typename _Graph>
    12301236  class GraphReader {
    12311237  public:
  • lemon/lgf_writer.h

    diff -r e80e08222fdf -r 9757e3d9bfeb lemon/lgf_writer.h
    a b  
    914914  /// It can be used almost the same way as \c DigraphWriter.
    915915  /// The only difference is that this class can handle edges and
    916916  /// edge maps as well as arcs and arc maps.
     917  ///
     918  /// The arc maps are written into the file as two columns, the
     919  /// caption of the columns are the name of the map prefixed with \c
     920  /// '+' and \c '-'. The arcs are written into the \c \@attributes
     921  /// section as a \c '+' or a \c '-' prefix (depends on the direction
     922  /// of the arc) and the label of corresponding edge.
    917923  template <typename _Graph>
    918924  class GraphWriter {
    919925  public: