COIN-OR::LEMON - Graph Library

Changeset 1540:7d028a73d7f2 in lemon-0.x


Ignore:
Timestamp:
07/05/05 16:36:10 (14 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2034
Message:

Documented Balazs's stuff. Quite enough of that.

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • demo/sample.lgf

    r1530 r1540  
    16160       2       1       10
    17170       1       0       10
     18#This is a comment here
    1819@nodes
    1920source 0
  • doc/graph_io.dox

    r1532 r1540  
    55\page graph-io-page Graph Input-Output
    66
    7 The standard graph IO enables to store graphs and additional maps
    8 in a flexible and efficient way.
     7The standard graph IO enables one to store graphs and additional maps
     8(i.e. functions on the nodes or edges) in a flexible and efficient way.
     9Before you read this page you should be familiar with LEMON
     10\ref graphs "graphs" and \ref maps-page "maps".
    911
    1012\section format The general file format
     
    1820\li attributes
    1921
    20 The nodeset section starts with the following line:
     22Some of these sections can be omitted, but you will basicly need the nodeset
     23section (unless your graph has no nodes at all) and the edgeset section
     24(unless your graph has no edges at all).
     25
     26The nodeset section describes the nodes of your graph: it identifies the nodes
     27and gives the maps defined on them, if any. It starts with the
     28following line:
    2129
    2230<tt>\@nodeset</tt>
     
    2533following line describes a node in the graph: it contains the values of the
    2634maps in the right order. The map named "id" should contain unique values
    27 because it is regarded as an ID-map. For example:
     35because it is regarded as an ID-map. These ids need not be numbers but they
     36must identify the nodes uniquely for later reference. For example:
    2837
    2938\code
     
    4049<tt>\@edgeset</tt>
    4150
    42 The next line contains the whitespace separated list of names of the maps.
    43 Each of the next lines describes one edge. The first two elements in the line
    44 are the IDs of the source and target (or tail and head) node of the edge as they occur in the ID node
    45 map. You can also have an optional ID map on the edges for later reference.
     51The next line contains the whitespace separated list of names of the edge
     52maps.  Each of the next lines describes one edge. The first two elements in
     53the line are the IDs of the source and target (or tail and head) nodes of the
     54edge as they occur in the ID node map of the nodeset section. You can also
     55have an optional ID map on the edges for later reference (which has to be
     56unique in this case).
    4657
    4758\code
     
    5364\endcode
    5465
    55 The next section contains <em>labeled nodes</em> (i.e. nodes having a special
     66The \e nodes section contains <em>labeled (distinguished) nodes</em>
     67(i.e. nodes having a special
    5668label on them). The section starts with
    5769
     
    5971
    6072Each of the next lines contains a label for a node in the graph
    61 and then the ID described in the nodeset section.
     73and then the ID as described in the \e nodeset section.
    6274
    6375\code
     
    6779\endcode
    6880
    69 The last section describes the <em>labeled edges</em>
     81The last section describes the <em>labeled (distinguished) edges</em>
    7082(i.e. edges having a special label on them). It starts with \c \@edges
    7183and then each line contains the name of the edge and the ID.
    7284
    7385\code
    74 @nodes
     86@edges
    7587observed c
    7688\endcode
     
    8193
    8294The attributes section can handle some information about the graph. It
    83 contains in each line an key and the mapped value to key. The key should
    84 be a string without whitespace, the value can be from various type.
     95contains key-value pairs in each line (a key and the mapped value to key). The
     96key should be a string without whitespaces, the value can be of various types.
    8597
    8698\code
     
    92104\endcode
    93105
    94 \code
    95 @end
    96 \endcode
    97 =======
    98 The file ends with the
    99 
    100106<tt> \@end </tt>
    101107
     
    104110
    105111\section use Using graph input-output
    106 The graph input and output is based on reading and writing  commands. The user
    107 adds reading and writing commands to the reader or writer class, then he
    108 calls the \c run() method that executes all the given commands.
     112
     113The easiest way of using graph input and output is using the versions of the
     114  public \ref readGraph() and \ref writeGraph() functions; if you don't need
     115  very sophisticated behaviour then you might be satisfied with
     116  those. Otherwise go on reading this page.
     117
     118The graph input and output is based on <em> reading and writing
     119commands</em>. The user gives reading and writing commands to the reader or
     120writer class, then he calls the \c run() method that executes all the given
     121commands.
    109122
    110123\subsection write Writing a graph
     
    112125The \c GraphWriter class provides the graph output. To write a graph
    113126you should first give writing commands to the writer. You can declare
    114 write command as \c NodeMap or \c EdgeMap writing and labeled Node and
     127writing command as \c NodeMap or \c EdgeMap writing and labeled Node and
    115128Edge writing.
    116129
     
    120133
    121134The \c writeNodeMap() function declares a \c NodeMap writing command in the
    122 \c GraphWriter. You should give a name of the map and the map
     135\c GraphWriter. You should give a name to the map and the map
    123136object as parameters. The NodeMap writing command with name "id" should write a
    124 unique map because it is regarded as ID map.
     137unique map because it will be regarded as an ID map.
    125138
    126139\see IdMap, DescriptorMap 
     
    175188\subsection reading Reading a graph
    176189
    177 The given file format may contain several maps and labeled nodes or edges.
     190The file to be read may contain several maps and labeled nodes or edges.
    178191If you read a graph you need not read all the maps and items just those
    179192that you need. The interface of the \c GraphReader is very similar to
     
    189202\endcode
    190203
    191 The \c readNodeMap() function reads a map from the \c \@nodeset section.
     204The \c readNodeMap() function reads a map from the \c nodeset section.
    192205If there is a map that you do not want to read from the file and there are
    193206whitespaces in the string represenation of the values then you should
     
    240253\endcode
    241254
     255\anchor rwbackground
    242256\section types Background of Reading and Writing
     257
     258
    243259To read a map (on the nodes or edges)
    244260the \c GraphReader should know how to read a Value from the given map.
     
    247263When the reader should skip a value in the stream, because you do not
    248264want to store it in a map, the reader skips a character sequence without
    249 whitespace.
     265whitespaces.
    250266
    251267If you want to change the functionality of the reader, you can use
     
    265281
    266282For example, the \c "strings" nodemap contains strings and you do not need
    267 the value of the string just the length. Then you can implement own Reader
     283the value of the string just the length. Then you can implement an own Reader
    268284struct.
    269285
     
    285301special template parameter to the GraphReader class. By default, the
    286302template parameter is \c DefaultReaderTraits. A reader traits class
    287 should provide an inner template class Reader for each type, and an
     303should provide an inner template class Reader for each type, and a
    288304DefaultReader for skipping a value.
    289305
    290 The specialization of  writing should be very similar to that of reading.
    291 
    292 \section undir Undir graphs
    293 
    294 In the undir graph format there is an \c undiredgeset section instead of
    295 the \c edgeset section. The first line of the section describes the
    296 undirected egdes' names and all next lines describes one undirected edge
    297 with the the incident nodes and the values of the map.
    298 
    299 The format handles the directed edge maps as a syntactical sugar, if there
    300 is two map which names are the same with a \c '+' and a \c '-' prefix
    301 then it can be read as an directed map.
     306The specialization of  writing is very similar to that of reading.
     307
     308\section undir Undirected graphs
     309
     310In a file describing an undirected graph (undir graph, for short) you find an
     311\c undiredgeset section instead of the \c edgeset section. The first line of
     312the section describes the names of the maps on the undirected egdes and all
     313next lines describe one undirected edge with the the incident nodes and the
     314values of the map.
     315
     316The format handles directed edge maps as a syntactical sugar???, if there
     317are two maps with names being the same with a \c '+' and a \c '-' prefix
     318then this will be read as a directed map.
    302319
    303320\code
     
    309326\endcode
    310327
    311 The \c edges section changed to \c undiredges section. This section
     328The \c edges section is changed to \c undiredges section. This section
    312329describes labeled edges and undirected edges. The directed edge label
    313 should start with a \c '+' and a \c '-' prefix what decide the direction
     330should start with a \c '+' or a \c '-' prefix to decide the direction
    314331of the edge.
    315332
     
    338355\section advanced Advanced features
    339356
    340 The graph reader and writer classes gives an easy way to read and write
    341 graphs. But sometimes we want more advanced features. This way we can
    342 use the more general lemon reader and writer interface.
    343 
    344 The lemon format is an section oriented file format. It contains one or
    345 more section, each starts with a line with \c \@ first character.
     357The graph reader and writer classes give an easy way to read and write
     358graphs. But sometimes we want more advanced features. In this case we can
     359use the more general <tt>lemon reader and writer</tt> interface.
     360
     361The LEMON file format is a section oriented file format. It contains one or
     362more sections, each starting with a line identifying its type
     363(the word starting with the \c \@  character).
    346364The content of the section this way cannot contain line with \c \@ first
    347365character. The file may contains comment lines with \c # first character.
     
    352370
    353371There are default section readers and writers for reading and writing
    354 item sets, and labeled items in the graph. These reads and writes
     372item sets, and labeled items in the graph. These read and write
    355373the format described above. Other type of data can be handled with own
    356374section reader and writer classes which are inherited from the
     
    393411The other advanced stuff of the generalized file format is that
    394412multiple edgesets can be stored to the same nodeset. It can be used
    395 by example as a network traffic matrix.
    396 
    397 In example there is a network with symmetric links and there are assymetric
     413for example as a network traffic matrix.
     414
     415In our example there is a network with symmetric links and there are assymetric
    398416traffic request on the network. This construction can be stored in an
    399 undirected graph and in an directed NewEdgeSetAdaptor class. The example
     417undirected graph and in a directed NewEdgeSetAdaptor class. The example
    400418shows the input with the LemonReader class:
    401419
     
    418436Because the GraphReader and the UndirGraphReader can be converted
    419437to LemonReader and it can resolve the ID's of the items, the previous
    420 result can be achived with the UndirGraphReader class also.
     438result can be achived with the UndirGraphReader class, too.
    421439
    422440
  • lemon/dfs.h

    r1536 r1540  
    645645    ///\return The length of the %DFS s---t path if there exists one,
    646646    ///0 otherwise.
    647     ///\note Apart from the return value, d.run(s) is
     647    ///\note Apart from the return value, d.run(s,t) is
    648648    ///just a shortcut of the following code.
    649649    ///\code
  • lemon/graph_reader.h

    r1534 r1540  
    3737  /// Before you read this documentation it might be useful to read the general
    3838  /// description of  \ref graph-io-page "Graph Input-Output".
     39  ///
    3940  /// If you don't need very sophisticated
    4041  /// behaviour then you can use the versions of the public function
    4142  /// \ref readGraph() to read a graph (or a max flow instance etc).
    4243  ///
    43   /// The given file format may contain several maps and labeled nodes or
     44  /// The file to be read may contain several maps and labeled nodes or
    4445  /// edges.
    4546  ///
     
    4748  /// that you need. The interface of the \c GraphReader is very similar to
    4849  /// the GraphWriter but the reading method does not depend on the order the
    49   /// given commands.
    50   ///
    51   /// The reader object suppose that each not readed value does not contain
     50  /// given commands (i.e. you don't have to insist on the order in which the
     51  /// maps are given in the file).
     52  ///
     53  /// The reader object assumes that not readed values do not contain
    5254  /// whitespaces, therefore it has some extra possibilities to control how
    5355  /// it should skip the values when the string representation contains spaces.
     
    9193  ///
    9294  /// With the \c readAttribute() functions you can read an attribute
    93   /// in a variable. You can specify the reader for the attribute as
     95  /// into a variable. You can specify the reader for the attribute as
    9496  /// the nodemaps.
    9597  ///
    9698  /// After you give all read commands you must call the \c run() member
    97   /// function, which execute all the commands.
     99  /// function, which executes all the commands.
    98100  ///
    99101  /// \code
     
    120122    ///
    121123    /// Construct a new GraphReader. It reads into the given graph
    122     /// and it use the given reader as the default skipper.
     124    /// and it uses the given reader as the default skipper.
    123125    GraphReader(std::istream& _is,
    124126                typename SmartParameter<Graph>::Type _graph,
     
    135137    ///
    136138    /// Construct a new GraphReader. It reads into the given graph
    137     /// and it use the given reader as the default skipper.
     139    /// and it uses the given reader as the default skipper.
    138140    GraphReader(const std::string& _filename,
    139141                typename SmartParameter<Graph>::Type _graph,
     
    151153    ///
    152154    /// Construct a new GraphReader. It reads into the given graph
    153     /// and it use the given reader as the default skipper.
     155    /// and it uses the given reader as the default skipper.
    154156    GraphReader(LemonReader& _reader,
    155157                typename SmartParameter<Graph>::Type _graph,
     
    171173    }
    172174
    173     /// \brief Add a new node map reader command for the reader.
    174     ///
    175     /// Add a new node map reader command for the reader.
     175    /// \brief Give a new node map reading command to the reader.
     176    ///
     177    /// Give a new node map reading command to the reader.
    176178    template <typename Map>
    177179    GraphReader& readNodeMap(std::string name, Map& map) {
     
    186188    }
    187189
    188     /// \brief Add a new node map reader command for the reader.
    189     ///
    190     /// Add a new node map reader command for the reader.
     190    /// \brief Give a new node map reading command to the reader.
     191    ///
     192    /// Give a new node map reading command to the reader.
    191193    template <typename Reader, typename Map>
    192194    GraphReader& readNodeMap(std::string name, Map& map,
     
    203205    }
    204206
    205     /// \brief Add a new node map skipper command for the reader.
    206     ///
    207     /// Add a new node map skipper command for the reader.
     207    /// \brief Give a new node map skipping command to the reader.
     208    ///
     209    /// Give a new node map skipping command to the reader.
    208210    template <typename Reader>
    209211    GraphReader& skipNodeMap(std::string name,
     
    213215    }
    214216
    215     /// \brief Add a new edge map reader command for the reader.
    216     ///
    217     /// Add a new edge map reader command for the reader.
     217    /// \brief Give a new edge map reading command to the reader.
     218    ///
     219    /// Give a new edge map reading command to the reader.
    218220    template <typename Map>
    219221    GraphReader& readEdgeMap(std::string name, Map& map) {
     
    229231
    230232
    231     /// \brief Add a new edge map reader command for the reader.
    232     ///
    233     /// Add a new edge map reader command for the reader.
     233    /// \brief Give a new edge map reading command to the reader.
     234    ///
     235    /// Give a new edge map reading command to the reader.
    234236    template <typename Reader, typename Map>
    235237    GraphReader& readEdgeMap(std::string name, Map& map,
     
    246248    }
    247249
    248     /// \brief Add a new edge map skipper command for the reader.
    249     ///
    250     /// Add a new edge map skipper command for the reader.
     250    /// \brief Give a new edge map skipping command to the reader.
     251    ///
     252    /// Give a new edge map skipping command to the reader.
    251253    template <typename Reader>
    252254    GraphReader& skipEdgeMap(std::string name,
     
    256258    }
    257259
    258     /// \brief Add a new labeled node reader for the reader.
    259     ///
    260     /// Add a new labeled node reader for the reader.
     260    /// \brief Give a new labeled node reading command to the reader.
     261    ///
     262    /// Give a new labeled node reading command to the reader.
    261263    GraphReader& readNode(std::string name, Node& node) {
    262264      node_reader.readNode(name, node);
     
    264266    }
    265267
    266     /// \brief Add a new labeled edge reader for the reader.
    267     ///
    268     /// Add a new labeled edge reader for the reader.
     268    /// \brief Give a new labeled edge reading command to the reader.
     269    ///
     270    /// Give a new labeled edge reading command to the reader.
    269271    GraphReader& readEdge(std::string name, Edge& edge) {
    270272      edge_reader.readEdge(name, edge);
     
    272274    }
    273275
    274     /// \brief Add a new attribute reader command.
    275     ///
    276     ///  Add a new attribute reader command.
     276    /// \brief Give a new attribute reading command.
     277    ///
     278    ///  Give a new attribute reading command.
    277279    template <typename Value>
    278280    GraphReader& readAttribute(std::string name, Value& value) {
     
    281283    }
    282284   
    283     /// \brief Add a new attribute reader command.
    284     ///
    285     ///  Add a new attribute reader command.
     285    /// \brief Give a new attribute reading command.
     286    ///
     287    ///  Give a new attribute reading command.
    286288    template <typename Reader, typename Value>
    287289    GraphReader& readAttribute(std::string name, Value& value,
     
    293295    /// \brief Conversion operator to LemonReader.
    294296    ///
    295     /// Conversion operator to LemonReader. It make possible
    296     /// to access the encapsulated \e LemonReader, this way
    297     /// you can attach to this reader new instances of
    298     /// \e LemonReader::SectionReader.
     297    /// Conversion operator to LemonReader. It makes possible to access the
     298    /// encapsulated \e LemonReader, this way you can attach to this reader
     299    /// new instances of \e LemonReader::SectionReader. For more details see
     300    /// the \ref rwbackground "Background of Reading and Writing".
    299301    operator LemonReader&() {
    300302      return *reader;
    301303    }
    302304
    303     /// \brief Executes the reader commands.
    304     ///
    305     /// Executes the reader commands.
     305    /// \brief Executes the reading commands.
     306    ///
     307    /// Executes the reading commands.
    306308    void run() {
    307309      reader->run();
     
    433435  /// \brief The undir graph reader class.
    434436  ///
     437  /// The \c UndirGraphReader class provides the graph input.
     438  /// Before you read this documentation it might be useful to read the general
     439  /// description of  \ref graph-io-page "Graph Input-Output".
     440  ///
     441  /// If you don't need very sophisticated
     442  /// behaviour then you can use the versions of the public function
     443  /// \ref readGraph() to read a graph (or a max flow instance etc).
     444  ///
    435445  /// The given file format may contain several maps and labeled nodes or
    436446  /// edges.
    437447  ///
    438448  /// If you read a graph you need not read all the maps and items just those
    439   /// that you need. The interface of the \c GraphReader is very similar to
    440   /// the GraphWriter but the reading method does not depend on the order the
    441   /// given commands.
     449  /// that you need. The interface of the \c UndirGraphReader is very similar
     450  /// to the UndirGraphWriter but the reading method does not depend on the
     451  /// order of the given commands.
    442452  ///
    443453  /// The reader object suppose that each not readed value does not contain
     
    570580    }
    571581
    572     /// \brief Add a new node map reader command for the reader.
    573     ///
    574     /// Add a new node map reader command for the reader.
     582    /// \brief Give a new node map reading command to the reader.
     583    ///
     584    /// Give a new node map reading command to the reader.
    575585    template <typename Map>
    576586    UndirGraphReader& readNodeMap(std::string name, Map& map) {
     
    585595    }
    586596
    587     /// \brief Add a new node map reader command for the reader.
    588     ///
    589     /// Add a new node map reader command for the reader.
     597    /// \brief Give a new node map reading command to the reader.
     598    ///
     599    /// Give a new node map reading command to the reader.
    590600    template <typename Reader, typename Map>
    591601    UndirGraphReader& readNodeMap(std::string name, Map& map,
     
    602612    }
    603613
    604     /// \brief Add a new node map skipper command for the reader.
    605     ///
    606     /// Add a new node map skipper command for the reader.
     614    /// \brief Give a new node map skipping command to the reader.
     615    ///
     616    /// Give a new node map skipping command to the reader.
    607617    template <typename Reader>
    608618    UndirGraphReader& skipNodeMap(std::string name,
     
    612622    }
    613623
    614     /// \brief Add a new undirected edge map reader command for the reader.
    615     ///
    616     /// Add a new undirected edge map reader command for the reader.
     624    /// \brief Give a new undirected edge map reading command to the reader.
     625    ///
     626    /// Give a new undirected edge map reading command to the reader.
    617627    template <typename Map>
    618628    UndirGraphReader& readUndirEdgeMap(std::string name, Map& map) {
     
    628638
    629639
    630     /// \brief Add a new undirected edge map reader command for the reader.
    631     ///
    632     /// Add a new undirected edge map reader command for the reader.
     640    /// \brief Give a new undirected edge map reading command to the reader.
     641    ///
     642    /// Give a new undirected edge map reading command to the reader.
    633643    template <typename Reader, typename Map>
    634644    UndirGraphReader& readUndirEdgeMap(std::string name, Map& map,
     
    645655    }
    646656
    647     /// \brief Add a new undirected edge map skipper command for the reader.
    648     ///
    649     /// Add a new undirected edge map skipper command for the reader.
     657    /// \brief Give a new undirected edge map skipping command to the reader.
     658    ///
     659    /// Give a new undirected edge map skipping command to the reader.
    650660    template <typename Reader>
    651661    UndirGraphReader& skipUndirEdgeMap(std::string name,
     
    656666
    657667
    658     /// \brief Add a new edge map reader command for the reader.
    659     ///
    660     /// Add a new edge map reader command for the reader.
     668    /// \brief Give a new edge map reading command to the reader.
     669    ///
     670    /// Give a new edge map reading command to the reader.
    661671    template <typename Map>
    662672    UndirGraphReader& readEdgeMap(std::string name, Map& map) {
     
    672682
    673683
    674     /// \brief Add a new edge map reader command for the reader.
    675     ///
    676     /// Add a new edge map reader command for the reader.
     684    /// \brief Give a new edge map reading command to the reader.
     685    ///
     686    /// Give a new edge map reading command to the reader.
    677687    template <typename Reader, typename Map>
    678688    UndirGraphReader& readEdgeMap(std::string name, Map& map,
     
    689699    }
    690700
    691     /// \brief Add a new edge map skipper command for the reader.
    692     ///
    693     /// Add a new edge map skipper command for the reader.
     701    /// \brief Give a new edge map skipping command to the reader.
     702    ///
     703    /// Give a new edge map skipping command to the reader.
    694704    template <typename Reader>
    695705    UndirGraphReader& skipEdgeMap(std::string name,
     
    699709    }
    700710
    701     /// \brief Add a new labeled node reader for the reader.
    702     ///
    703     /// Add a new labeled node reader for the reader.
     711    /// \brief Give a new labeled node reading command to the reader.
     712    ///
     713    /// Give a new labeled node reading command to the reader.
    704714    UndirGraphReader& readNode(std::string name, Node& node) {
    705715      node_reader.readNode(name, node);
     
    707717    }
    708718
    709     /// \brief Add a new labeled edge reader for the reader.
    710     ///
    711     /// Add a new labeled edge reader for the reader.
     719    /// \brief Give a new labeled edge reading command to the reader.
     720    ///
     721    /// Give a new labeled edge reading command to the reader.
    712722    UndirGraphReader& readEdge(std::string name, Edge& edge) {
    713723      undir_edge_reader.readEdge(name, edge);
    714724    }
    715725
    716     /// \brief Add a new labeled undirected edge reader for the reader.
    717     ///
    718     /// Add a new labeled undirected edge reader for the reader.
     726    /// \brief Give a new labeled undirected edge reading command to the
     727    /// reader.
     728    ///
     729    /// Give a new labeled undirected edge reading command to the reader.
    719730    UndirGraphReader& readUndirEdge(std::string name, UndirEdge& edge) {
    720731      undir_edge_reader.readUndirEdge(name, edge);
    721732    }
    722733
    723     /// \brief Add a new attribute reader command.
    724     ///
    725     ///  Add a new attribute reader command.
     734    /// \brief Give a new attribute reading command.
     735    ///
     736    ///  Give a new attribute reading command.
    726737    template <typename Value>
    727738    UndirGraphReader& readAttribute(std::string name, Value& value) {
     
    730741    }
    731742   
    732     /// \brief Add a new attribute reader command.
    733     ///
    734     ///  Add a new attribute reader command.
     743    /// \brief Give a new attribute reading command.
     744    ///
     745    ///  Give a new attribute reading command.
    735746    template <typename Reader, typename Value>
    736747    UndirGraphReader& readAttribute(std::string name, Value& value,
     
    750761    }
    751762
    752     /// \brief Executes the reader commands.
    753     ///
    754     /// Executes the reader commands.
     763    /// \brief Executes the reading commands.
     764    ///
     765    /// Executes the reading commands.
    755766    void run() {
    756767      reader->run();
  • lemon/graph_utils.h

    r1538 r1540  
    3131///\brief Graph utilities.
    3232///
    33 ///\todo Please
    34 ///revise the documentation.
    3533///
    3634
     
    4341  /// \brief Function to count the items in the graph.
    4442  ///
    45   /// This function counts the items in the graph.
     43  /// This function counts the items (nodes, edges etc) in the graph.
    4644  /// The complexity of the function is O(n) because
    4745  /// it iterates on all of the items.
     
    126124  /// This function counts the undirected edges in the graph.
    127125  /// The complexity of the function is O(e) but for some
    128   /// graph structure it is specialized to run in O(1).
     126  /// graph structures it is specialized to run in O(1).
    129127
    130128  template <typename Graph>
     
    194192  }
    195193
    196   /// \brief Copy the source map to the target map.
    197   ///
    198   /// Copy the \c source map to the \c target map. It uses the given iterator
    199   /// to iterate on the data structure and it use the \c ref mapping to
    200   /// convert the source's keys to the target's keys.
     194  /// \brief Copy a map.
     195  ///
     196  /// Thsi function copies the \c source map to the \c target map. It uses the
     197  /// given iterator to iterate on the data structure and it uses the \c ref
     198  /// mapping to convert the source's keys to the target's keys.
    201199  template <typename Target, typename Source,
    202200            typename ItemIt, typename Ref>         
     
    221219
    222220
    223   /// \brief Class to copy a graph to an other graph.
    224   ///
    225   /// Class to copy a graph to an other graph. It can be used easier
    226   /// with the \c copyGraph() function.
     221  /// \brief Class to copy a graph.
     222  ///
     223  /// Class to copy a graph to an other graph (duplicate a graph). The
     224  /// simplest way of using it is through the \c copyGraph() function.
    227225  template <typename Target, typename Source>
    228226  class GraphCopy {
     
    355353  /// After the copy the \c nr map will contain the mapping from the
    356354  /// source graph's nodes to the target graph's nodes and the \c ecr will
    357   /// contain the mapping from the target graph's edge to the source's
     355  /// contain the mapping from the target graph's edges to the source's
    358356  /// edges.
    359357  template <typename Target, typename Source>
     
    459457  /// Provides an immutable and unique id for each item in the graph.
    460458
    461   /// The IdMap class provides a unique and immutable mapping for each item
    462   /// in the graph.
     459  /// The IdMap class provides a unique and immutable id for each item of the
     460  /// same type (e.g. node) in the graph. This id is <ul><li>\b unique:
     461  /// different items (nodes) get different ids <li>\b immutable: the id of an
     462  /// item (node) does not change (even if you delete other nodes).  </ul>
     463  /// Through this map you get access (i.e. can read) the inner id values of
     464  /// the items stored in the graph. This map can be inverted with its member
     465  /// class \c InverseMap.
    463466  ///
    464467  template <typename _Graph, typename _Item>
     
    488491  public:
    489492
    490     /// \brief The class represents the inverse of the map.
    491     ///
    492     /// The class represents the inverse of the map.
     493    /// \brief The class represents the inverse of its owner (IdMap).
     494    ///
     495    /// The class represents the inverse of its owner (IdMap).
    493496    /// \see inverse()
    494497    class InverseMap {
     
    518521    /// \brief Gives back the inverse of the map.
    519522    ///
    520     /// Gives back the inverse of the map.
     523    /// Gives back the inverse of the IdMap.
    521524    InverseMap inverse() const { return InverseMap(*graph);}
    522525
     
    526529  /// \brief General invertable graph-map type.
    527530
    528   /// This type provides simple invertable map functions.
     531  /// This type provides simple invertable graph-maps.
    529532  /// The InvertableMap wraps an arbitrary ReadWriteMap
    530533  /// and if a key is set to a new value then store it
     
    659662  /// item in the graph.
    660663  ///
    661   /// The DescriptorMap class provides a mutable, continuous and immutable
    662   /// mapping for each item in the graph. The value for an item may mutated
    663   /// on each operation when the an item erased or added to graph.
     664  /// The DescriptorMap class provides a unique and continuous (but mutable)
     665  /// descriptor (id) for each item of the same type (e.g. node) in the
     666  /// graph. This id is <ul><li>\b unique: different items (nodes) get
     667  /// different ids <li>\b continuous: the range of the ids is the set of
     668  /// integers between 0 and \c n-1, where \c n is the number of the items of
     669  /// this type (e.g. nodes) (so the id of a node can change if you delete an
     670  /// other node, i.e. this id is mutable).  </ul> This map can be inverted
     671  /// with its member class \c InverseMap.
    664672  ///
    665673  /// \param _Graph The graph class the \c DescriptorMap belongs to.
     
    755763
    756764  public:
    757     /// \brief The inverse map type.
    758     ///
    759     /// The inverse map type.
     765    /// \brief The inverse map type of DescriptorMap.
     766    ///
     767    /// The inverse map type of DescriptorMap.
    760768    class InverseMap {
    761769    public:
     
    874882  /// \brief Returns a \ref TargetMap class
    875883  ///
    876   /// This function just returns an \ref TargetMap class.
     884  /// This function just returns a \ref TargetMap class.
    877885  /// \relates TargetMap
    878886  template <typename Graph>
     
    881889  }
    882890
    883   /// \brief Returns the "forward" directed edge view of undirected edge.
    884   ///
    885   /// Returns the "forward" directed edge view of undirected edge.
     891  /// \brief Returns the "forward" directed edge view of an undirected edge.
     892  ///
     893  /// Returns the "forward" directed edge view of an undirected edge.
    886894  /// \author Balazs Dezso
    887895  template <typename Graph>
     
    922930  }
    923931
    924   /// \brief Returns the "backward" directed edge view of undirected edge.
    925   ///
    926   /// Returns the "backward" directed edge view of undirected edge.
     932  /// \brief Returns the "backward" directed edge view of an undirected edge.
     933  ///
     934  /// Returns the "backward" directed edge view of an undirected edge.
    927935  /// \author Balazs Dezso
    928936  template <typename Graph>
     
    955963  /// \brief Returns a \ref BackwardMap class
    956964
    957   /// This function just returns an \ref BackwardMap class.
     965  /// This function just returns a \ref BackwardMap class.
    958966  /// \relates BackwardMap
    959967  template <typename Graph>
     
    976984  /// \brief Map of the node in-degrees.
    977985  ///
    978   /// This map returns the in-degree of a node. Ones it is constructed,
     986  /// This map returns the in-degree of a node. Once it is constructed,
    979987  /// the degrees are stored in a standard NodeMap, so each query is done
    980   /// in constant time. On the other hand, the values updates automatically
     988  /// in constant time. On the other hand, the values are updated automatically
    981989  /// whenever the graph changes.
    982990  ///
     
    10681076  /// \brief Map of the node out-degrees.
    10691077  ///
    1070   /// This map returns the out-degree of a node. One it is constructed,
     1078  /// This map returns the out-degree of a node. Once it is constructed,
    10711079  /// the degrees are stored in a standard NodeMap, so each query is done
    1072   /// in constant time. On the other hand, the values updates automatically
     1080  /// in constant time. On the other hand, the values are updated automatically
    10731081  /// whenever the graph changes.
    10741082  ///
  • lemon/graph_writer.h

    r1534 r1540  
    3838  /// Before you read this documentation it might be useful to read the general
    3939  /// description of  \ref graph-io-page "Graph Input-Output".
     40  ///
    4041  /// If you don't need very sophisticated
    4142  /// behaviour then you can use the versions of the public function
     
    165166    }
    166167
     168
    167169    /// \brief Issue a new node map writing command for the writer.
    168170    ///
     
    239241    /// to access the encapsulated \e LemonWriter, this way
    240242    /// you can attach to this writer new instances of
    241     /// \e LemonWriter::SectionWriter.
     243    /// \e LemonWriter::SectionWriter. For more details see
     244    /// the \ref rwbackground "Background of Reading and Writing".
    242245    operator LemonWriter&() {
    243246      return *writer;
     
    569572    /// This function issues a new <i> undirected edge map writing
    570573    /// command</i> to the writer.
    571     template <typename Writer, typename Map>
     574   template <typename Writer, typename Map>
    572575    UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map,
    573576                                        const Writer& writer = Writer()) {
  • lemon/lp_glpk.cc

    r1473 r1540  
    446446    case LPX_D_UNDEF://Undefined (no solve has been run yet)
    447447      return UNDEFINED;
    448     case LPX_D_NOFEAS://There is no feasible solution (primal, I guess)
     448    case LPX_D_NOFEAS://There is no dual feasible solution
    449449//    case LPX_D_INFEAS://Infeasible
    450450      return INFEASIBLE;
Note: See TracChangeset for help on using the changeset viewer.