COIN-OR::LEMON - Graph Library

Changeset 1540:7d028a73d7f2 in lemon-0.x for lemon/graph_reader.h


Ignore:
Timestamp:
07/05/05 16:36:10 (19 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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();
Note: See TracChangeset for help on using the changeset viewer.