COIN-OR::LEMON - Graph Library

Changeset 434:1ce1b4cd8dd5 in lemon-0.x


Ignore:
Timestamp:
04/27/04 10:31:00 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@582
Message:

Some more docs.
DirPath::Builder::setFist() added. (It is empty.)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/Doxyfile

    r432 r434  
    405405                         ../src/work/alpar/list_graph.h \
    406406                         ../src/work/athos/minlengthpaths.h \
     407                         ../src/work/klao/path.h \
    407408                         ../src/work/marci/graph_wrapper.h     
    408409                         
  • src/work/klao/path.h

    r369 r434  
    11// -*- c++ -*- //
    22
    3 /**
    4  *
    5  * Class for representing paths in graphs.
    6  *
    7  */
     3///ingroup datas
     4///\file
     5///\brief Class for representing paths in graphs.
    86
    97#ifndef HUGO_PATH_H
     
    1816namespace hugo {
    1917
     18  /// \addtogroup datas
     19  /// @{
     20
     21  ///A container for directed paths
     22
     23  ///\param Graph The graph type in which the path is.
     24  ///
     25  ///In a sense, the path can be treated as a graph, for is has \c NodeIt
     26  ///and \c EdgeIt with the same usage. These types converts to the \c Node
     27  ///and \c Edge of the original graph.
     28  ///\todo How to clear a path?
     29  ///\todo Clarify the consistency checks to do.
    2030  template<typename Graph>
    2131  class DirPath {
     
    3343  public:
    3444
     45    /// Constructor
     46   
     47    /// \param _G The graph in which the path is.
     48    ///
    3549    DirPath(const Graph &_G) : gr(&_G) {}
    3650
    3751    /// Subpath defined by two nodes.
    38     /// It is an error if the two edges are not in order!
     52    /// \warning It is an error if the two edges are not in order!
    3953    DirPath(const DirPath &P, const NodeIt &a, const NodeIt &b);
    4054    /// Subpath defined by two edges. Contains edges in [a,b)
    41     /// It is an error if the two edges are not in order!
     55    /// \warning It is an error if the two edges are not in order!
    4256    DirPath(const DirPath &P, const EdgeIt &a, const EdgeIt &b);
    4357
     
    129143
    130144    friend class Builder;   
     145
     146    ///Class to build paths
     147
     148    ///\ingroup datas
     149    ///This class is used to build new paths.
     150    ///You can push new edges to the front and to the back of the path in
     151    ///arbitrary order the you can commit these changes to the graph.
     152    ///\todo We must clarify when the path will be in "transitional" state.
    131153    class Builder {
    132154      DirPath &P;
     
    134156
    135157    public:
     158      ///Constructor
     159
     160      ///\param _P the path you want to build.
     161      ///
    136162      Builder(DirPath &_P) : P(_P) {}
    137163
     164      ///Set the first node of the path.
     165     
     166      ///Set the first node of the path.
     167      ///If the path is empty, this must be call before any call of
     168      ///\ref pushFront() or \ref pushBack()
     169      void setFirst(const GraphNode &) { }
     170     
     171      ///Push a new edge to the front of the path
     172
     173      ///Push a new edge to the front of the path.
     174      ///\sa setFirst()
    138175      bool pushFront(const GraphEdge& e) {
    139176        if( empty() || P.gr->head(e)==from() ) {
     
    143180        return false;
    144181      }
     182      ///Push a new edge to the back of the path
     183
     184      ///Push a new edge to the back of the path.
     185      ///\sa setFirst()
    145186      bool pushBack(const GraphEdge& e) {
    146187        if( empty() || P.gr->tail(e)==to() ) {
     
    151192      }
    152193
     194      ///Commit the changes to the path.
    153195      void commit() {
    154196        if( !d.empty() ) {
     
    158200      }
    159201
     202      ///Desctuctor
     203
     204      ///The desctuctor.
     205      ///It commit also commit the changes.
     206      ///\todo Is this what we want?
    160207      ~Builder() { commit(); }
    161208
     
    190237
    191238  };
    192 
    193239
    194240
     
    613659  }
    614660
     661  ///@}
    615662
    616663} // namespace hugo
Note: See TracChangeset for help on using the changeset viewer.