COIN-OR::LEMON - Graph Library

Changeset 1526:8c14aa8f27a2 in lemon-0.x for lemon/graph_writer.h


Ignore:
Timestamp:
06/30/05 18:13:30 (19 years ago)
Author:
athos
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2012
Message:

Mainly doc review.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_writer.h

    r1435 r1526  
    3434  /// \brief The graph writer class.
    3535  ///
    36   /// The \c GraphWriter class provides the graph output. To write a graph
    37   /// you should first give writing commands for the writer. You can declare
    38   /// write command as \c NodeMap or \c EdgeMap writing and labeled Node and
     36  /// The \c GraphWriter class provides the graph output.
     37  /// Before you read this documentation it might be useful to read the general
     38  /// description of  \ref graph-io-page "Graph Input-Output".
     39  /// To write a graph
     40  /// you should first give writing commands to the writer. You can declare
     41  /// write commands as \c NodeMap or \c EdgeMap writing and labeled Node and
    3942  /// Edge writing.
    4043  ///
     
    4750  /// the name of the map and the map object. The NodeMap writing
    4851  /// command with name "id" should write a unique map because it
    49   /// is regarded as ID map.
     52  /// is regarded as ID map (such a map is essential if the graph has edges).
    5053  ///
    5154  /// \code
     
    7073  ///
    7174  /// With \c writeNode() and \c writeEdge() functions you can
    72   /// point out Nodes and Edges in the graph. By example, you can
    73   /// write out the source and target of the graph.
     75  /// point out Nodes and Edges in the graph. For example, you can
     76  /// write out the source and target of a maximum flow instance.
    7477  ///
    7578  /// \code
     
    8184  ///
    8285  /// After you give all write commands you must call the \c run() member
    83   /// function, which execute all the writer commands.
     86  /// function, which executes all the writing commands.
    8487  ///
    8588  /// \code
     
    106109    /// \brief Construct a new GraphWriter.
    107110    ///
    108     /// Construct a new GraphWriter. It writes the given graph
     111    /// This function constructs a new GraphWriter to write the given graph
    109112    /// to the given stream.
    110113    GraphWriter(std::ostream& _os, const Graph& _graph)
     
    118121    /// \brief Construct a new GraphWriter.
    119122    ///
    120     /// Construct a new GraphWriter. It writes into the given graph
     123    /// This function constructs a new GraphWriter to write the given graph
    121124    /// to the given file.
    122125    GraphWriter(const std::string& _filename, const Graph& _graph)
     
    130133    /// \brief Construct a new GraphWriter.
    131134    ///
    132     /// Construct a new GraphWriter. It writes into the given graph
    133     /// to given LemonReader.
     135    /// This function constructs a new GraphWriter to write the given graph
     136    /// to the given LemonReader.
    134137    GraphWriter(LemonWriter& _writer, const Graph& _graph)
    135138      : writer(_writer), own_writer(false),
     
    142145    /// \brief Destruct the graph writer.
    143146    ///
    144     /// Destruct the graph writer.
     147    /// This function destructs the graph writer.
    145148    ~GraphWriter() {
    146149      if (own_writer)
     
    148151    }
    149152
    150     /// \brief Add a new node map writer command for the writer.
    151     ///
    152     /// Add a new node map writer command for the writer.
     153    /// \brief Issue a new node map writing command for the writer.
     154    ///
     155   /// This function issues a new <i> node map writing command</i> to the writer.
    153156    template <typename Map>
    154157    GraphWriter& writeNodeMap(std::string name, const Map& map) {
     
    157160    }
    158161
    159     /// \brief Add a new node map writer command for the writer.
    160     ///
    161     /// Add a new node map writer command for the writer.
     162    /// \brief Issue a new node map writing command for the writer.
     163    ///
     164   /// This function issues a new <i> node map writing command</i> to the writer.
    162165    template <typename Writer, typename Map>
    163166    GraphWriter& writeNodeMap(std::string name, const Map& map,
     
    168171
    169172
    170     /// \brief Add a new edge map writer command for the writer.
    171     ///
    172     /// Add a new edge map writer command for the writer.
     173    /// \brief Issue a new edge map writing command for the writer.
     174    ///
     175   /// This function issues a new <i> edge map writing command</i> to the writer.
    173176    template <typename Map>
    174177    GraphWriter& writeEdgeMap(std::string name, const Map& map) {
     
    178181
    179182
    180     /// \brief Add a new edge map writer command for the writer.
    181     ///
    182     /// Add a new edge map writer command for the writer.
     183    /// \brief Issue a new edge map writing command for the writer.
     184    ///
     185   /// This function issues a new <i> edge map writing command</i> to the writer.
    183186    template <typename Writer, typename Map>
    184187    GraphWriter& writeEdgeMap(std::string name, const Map& map,
     
    188191    }
    189192
    190     /// \brief Add a new labeled node writer for the writer.
    191     ///
    192     /// Add a new labeled node writer for the writer.
     193    /// \brief Issue a new labeled node writing command to the writer.
     194    ///
     195    /// This function issues a new <i> labeled node writing command</i>
     196    /// to the writer.
    193197    GraphWriter& writeNode(std::string name, const Node& node) {
    194198      node_writer.writeNode(name, node);
     
    196200    }
    197201
    198     /// \brief Add a new labeled edge writer for the writer.
    199     ///
    200     /// Add a new labeled edge writer for the writer.
     202    /// \brief Issue a new labeled edge writing command to the writer.
     203    ///
     204    /// This function issues a new <i> labeled edge writing command</i>
     205    /// to the writer.
    201206    GraphWriter& writeEdge(std::string name, const Edge& edge) {
    202207      edge_writer.writeEdge(name, edge);
    203208    }
    204209
    205     /// \brief Add a new attribute writer command.
    206     ///
    207     ///  Add a new attribute writer command.
     210    /// \brief Issue a new attribute writing command.
     211    ///
     212    /// This function issues a new <i> attribute writing command</i>
     213    /// to the writer.
    208214    template <typename Value>
    209215    GraphWriter& writeAttribute(std::string name, const Value& value) {
     
    212218    }
    213219   
    214     /// \brief Add a new attribute writer command.
    215     ///
    216     ///  Add a new attribute writer command.
     220    /// \brief Issue a new attribute writing command.
     221    ///
     222    /// This function issues a new <i> attribute writing command</i>
     223    /// to the writer.
    217224    template <typename Writer, typename Value>
    218225    GraphWriter& writeAttribute(std::string name, const Value& value,
     
    224231    /// \brief Conversion operator to LemonWriter.
    225232    ///
    226     /// Conversion operator to LemonWriter. It make possible
     233    /// Conversion operator to LemonWriter. It makes possible
    227234    /// to access the encapsulated \e LemonWriter, this way
    228235    /// you can attach to this writer new instances of
     
    232239    }
    233240
    234     /// \brief Executes the writer commands.
    235     ///
    236     /// Executes the writer commands.
     241    /// \brief Executes the writing commands.
     242    ///
     243    /// Executes the writing commands.
    237244    void run() {
    238245      writer->run();
     
    242249    ///
    243250    /// It writes the id of the given node. If there was written an "id"
    244     /// named node map then it will write the map value belongs to the node.
     251    /// named node map then it will write the map value belonging to the node.
    245252    void writeId(std::ostream& os, const Node& item) const {
    246253      nodeset_writer.writeId(os, item);
     
    250257    ///
    251258    /// It writes the id of the given edge. If there was written an "id"
    252     /// named edge map then it will write the map value belongs to the edge.
     259    /// named edge map then it will write the map value belonging to the edge.
    253260    void writeId(std::ostream& os, const Edge& item) const {
    254261      edgeset_writer.writeId(os, item);
     
    374381  ///
    375382  /// The \c UndirGraphWriter class provides the undir graph output. To write
    376   /// a graph you should first give writing commands for the writer. You can
     383  /// a graph you should first give writing commands to the writer. You can
    377384  /// declare write command as \c NodeMap, \c EdgeMap or \c UndirEdgeMap
    378385  /// writing and labeled Node, Edge or UndirEdge writing.
     
    417424  ///
    418425  /// With \c writeNode() and \c writeUndirEdge() functions you can
    419   /// point out nodes and undirected edges in the graph. By example, you can
     426  /// designate nodes and undirected edges in the graph. For example, you can
    420427  /// write out the source and target of the graph.
    421428  ///
     
    428435  ///
    429436  /// After you give all write commands you must call the \c run() member
    430   /// function, which execute all the writer commands.
     437  /// function, which executes all the writing commands.
    431438  ///
    432439  /// \code
     
    466473    /// \brief Construct a new UndirGraphWriter.
    467474    ///
    468     /// Construct a new UndirGraphWriter. It writes into the given graph
     475    /// Construct a new UndirGraphWriter. It writes the given graph
    469476    /// to the given file.
    470477    UndirGraphWriter(const std::string& _filename, const Graph& _graph)
     
    478485    /// \brief Construct a new UndirGraphWriter.
    479486    ///
    480     /// Construct a new UndirGraphWriter. It writes into the given graph
     487    /// Construct a new UndirGraphWriter. It writes the given graph
    481488    /// to given LemonReader.
    482489    UndirGraphWriter(LemonWriter& _writer, const Graph& _graph)
     
    496503    }
    497504
    498     /// \brief Add a new node map writer command for the writer.
    499     ///
    500     /// Add a new node map writer command for the writer.
     505    /// \brief Issue a new node map writing command to the writer.
     506    ///
     507   /// This function issues a new <i> node map writing command</i> to the writer.
    501508    template <typename Map>
    502509    UndirGraphWriter& writeNodeMap(std::string name, const Map& map) {
     
    505512    }
    506513
    507     /// \brief Add a new node map writer command for the writer.
    508     ///
    509     /// Add a new node map writer command for the writer.
     514    /// \brief Issue a new node map writing command to the writer.
     515    ///
     516   /// This function issues a new <i> node map writing command</i> to the writer.
    510517    template <typename Writer, typename Map>
    511518    UndirGraphWriter& writeNodeMap(std::string name, const Map& map,
     
    515522    }
    516523
    517     /// \brief Add a new edge map writer command for the writer.
    518     ///
    519     /// Add a new edge map writer command for the writer.
     524    /// \brief Issue a new edge map writing command to the writer.
     525    ///
     526   /// This function issues a new <i> edge map writing command</i> to the writer.
    520527    template <typename Map>
    521528    UndirGraphWriter& writeEdgeMap(std::string name, const Map& map) {
     
    524531    }
    525532
    526     /// \brief Add a new edge map writer command for the writer.
    527     ///
    528     /// Add a new edge map writer command for the writer.
     533    /// \brief Issue a new edge map writing command to the writer.
     534    ///
     535   /// This function issues a new <i> edge map writing command</i> to the writer.
    529536    template <typename Writer, typename Map>
    530537    UndirGraphWriter& writeEdgeMap(std::string name, const Map& map,
     
    534541    }
    535542
    536     /// \brief Add a new undirected edge map writer command for the writer.
    537     ///
    538     /// Add a new undirected edge map writer command for the writer.
     543    /// \brief Issue a new undirected edge map writing command to the writer.
     544    ///
     545    /// This function issues a new <i> undirected edge map writing
     546    /// command</i> to the writer.
    539547    template <typename Map>
    540548    UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map) {
     
    543551    }
    544552
    545     /// \brief Add a new undirected edge map writer command for the writer.
    546     ///
    547     /// Add a new edge undirected map writer command for the writer.
     553    /// \brief Issue a new undirected edge map writing command to the writer.
     554    ///
     555    /// This function issues a new <i> undirected edge map writing
     556    /// command</i> to the writer.
    548557    template <typename Writer, typename Map>
    549558    UndirGraphWriter& writeUndirEdgeMap(std::string name, const Map& map,
     
    553562    }
    554563
    555     /// \brief Add a new labeled node writer for the writer.
    556     ///
    557     /// Add a new labeled node writer for the writer.
     564    /// \brief Issue a new labeled node writer to the writer.
     565    ///
     566    /// This function issues a new <i> labeled node writing
     567    /// command</i> to the writer.
    558568    UndirGraphWriter& writeNode(std::string name, const Node& node) {
    559569      node_writer.writeNode(name, node);
     
    561571    }
    562572
    563     /// \brief Add a new labeled edge writer for the writer.
    564     ///
    565     /// Add a new labeled edge writer for the writer.
     573    /// \brief Issue a new labeled edge writer to the writer.
     574    ///
     575    /// This function issues a new <i> labeled edge writing
     576    /// command</i> to the writer.
    566577    UndirGraphWriter& writeEdge(std::string name, const Edge& edge) {
    567578      undir_edge_writer.writeEdge(name, edge);
    568579    }
    569580
    570     /// \brief Add a new labeled undirected edge writer for the writer.
    571     ///
    572     /// Add a new labeled undirected edge writer for the writer.
     581    /// \brief Issue a new labeled undirected edge writing command to
     582    /// the writer.
     583    ///
     584    /// Issue a new <i>labeled undirected edge writing command</i> to
     585    /// the writer.
    573586    UndirGraphWriter& writeUndirEdge(std::string name, const UndirEdge& edge) {
    574587      undir_edge_writer.writeUndirEdge(name, edge);
    575588    }
    576589
    577     /// \brief Add a new attribute writer command.
    578     ///
    579     ///  Add a new attribute writer command.
     590    /// \brief Issue a new attribute writing command.
     591    ///
     592    /// This function issues a new <i> attribute writing
     593    /// command</i> to the writer.
    580594    template <typename Value>
    581595    UndirGraphWriter& writeAttribute(std::string name, const Value& value) {
     
    584598    }
    585599   
    586     /// \brief Add a new attribute writer command.
    587     ///
    588     ///  Add a new attribute writer command.
     600    /// \brief Issue a new attribute writing command.
     601    ///
     602    /// This function issues a new <i> attribute writing
     603    /// command</i> to the writer.
    589604    template <typename Writer, typename Value>
    590605    UndirGraphWriter& writeAttribute(std::string name, const Value& value,
     
    596611    /// \brief Conversion operator to LemonWriter.
    597612    ///
    598     /// Conversion operator to LemonWriter. It make possible
     613    /// Conversion operator to LemonWriter. It makes possible
    599614    /// to access the encapsulated \e LemonWriter, this way
    600615    /// you can attach to this writer new instances of
     
    604619    }
    605620
    606     /// \brief Executes the writer commands.
    607     ///
    608     /// Executes the writer commands.
     621    /// \brief Executes the writing commands.
     622    ///
     623    /// Executes the writing commands.
    609624    void run() {
    610625      writer->run();
     
    614629    ///
    615630    /// It writes the id of the given node. If there was written an "id"
    616     /// named node map then it will write the map value belongs to the node.
     631    /// named node map then it will write the map value belonging to the node.
    617632    void writeId(std::ostream& os, const Node& item) const {
    618633      nodeset_writer.writeId(os, item);
     
    622637    ///
    623638    /// It writes the id of the given edge. If there was written an "id"
    624     /// named edge map then it will write the map value belongs to the edge.
     639    /// named edge map then it will write the map value belonging to the edge.
    625640    void writeId(std::ostream& os, const Edge& item) const {
    626641      undir_edgeset_writer.writeId(os, item);
     
    630645    ///
    631646    /// It writes the id of the given undirected edge. If there was written
    632     /// an "id" named edge map then it will write the map value belongs to
     647    /// an "id" named edge map then it will write the map value belonging to
    633648    /// the edge.
    634649    void writeId(std::ostream& os, const UndirEdge& item) const {
     
    652667
    653668
    654   /// \brief Write an undirected graph to the output.
    655   ///
    656   /// Write an undirected graph to the output.
     669  /// \brief Write an undirected multigraph (undirected graph + capacity
     670  /// map on the edges) to the output.
     671  ///
     672  /// Write an undirected multigraph (undirected graph + capacity
     673  /// map on the edges) to the output.
    657674  /// \param os The output stream.
    658675  /// \param g The graph.
Note: See TracChangeset for help on using the changeset viewer.