COIN-OR::LEMON - Graph Library

Changeset 782:853fcddcf282 in lemon for lemon/grid_graph.h


Ignore:
Timestamp:
08/23/09 11:09:22 (11 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Doc improvements, fixes and unifications for graphs (#311)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/grid_graph.h

    r664 r782  
    471471  /// \brief Grid graph class
    472472  ///
    473   /// This class implements a special graph type. The nodes of the
    474   /// graph can be indexed by two integer \c (i,j) value where \c i is
    475   /// in the \c [0..width()-1] range and j is in the \c
    476   /// [0..height()-1] range. Two nodes are connected in the graph if
    477   /// the indexes differ exactly on one position and exactly one is
    478   /// the difference. The nodes of the graph can be indexed by position
    479   /// with the \c operator()() function. The positions of the nodes can be
    480   /// get with \c pos(), \c col() and \c row() members. The outgoing
     473  /// GridGraph implements a special graph type. The nodes of the
     474  /// graph can be indexed by two integer values \c (i,j) where \c i is
     475  /// in the range <tt>[0..width()-1]</tt> and j is in the range
     476  /// <tt>[0..height()-1]</tt>. Two nodes are connected in the graph if
     477  /// the indices differ exactly on one position and the difference is
     478  /// also exactly one. The nodes of the graph can be obtained by position
     479  /// using the \c operator()() function and the indices of the nodes can
     480  /// be obtained using \c pos(), \c col() and \c row() members. The outgoing
    481481  /// arcs can be retrieved with the \c right(), \c up(), \c left()
    482482  /// and \c down() functions, where the bottom-left corner is the
    483483  /// origin.
     484  ///
     485  /// This class is completely static and it needs constant memory space.
     486  /// Thus you can neither add nor delete nodes or edges, however
     487  /// the structure can be resized using resize().
    484488  ///
    485489  /// \image html grid_graph.png
     
    497501  ///\endcode
    498502  ///
    499   /// This graph type fully conforms to the \ref concepts::Graph
    500   /// "Graph concept".
     503  /// This type fully conforms to the \ref concepts::Graph "Graph concept".
     504  /// Most of its member functions and nested classes are documented
     505  /// only in the concept class.
    501506  class GridGraph : public ExtendedGridGraphBase {
    502507    typedef ExtendedGridGraphBase Parent;
     
    504509  public:
    505510
    506     /// \brief Map to get the indices of the nodes as dim2::Point<int>.
    507     ///
    508     /// Map to get the indices of the nodes as dim2::Point<int>.
     511    /// \brief Map to get the indices of the nodes as \ref dim2::Point
     512    /// "dim2::Point<int>".
     513    ///
     514    /// Map to get the indices of the nodes as \ref dim2::Point
     515    /// "dim2::Point<int>".
    509516    class IndexMap {
    510517    public:
     
    515522
    516523      /// \brief Constructor
    517       ///
    518       /// Constructor
    519524      IndexMap(const GridGraph& graph) : _graph(graph) {}
    520525
    521526      /// \brief The subscript operator
    522       ///
    523       /// The subscript operator.
    524527      Value operator[](Key key) const {
    525528        return _graph.pos(key);
     
    541544
    542545      /// \brief Constructor
    543       ///
    544       /// Constructor
    545546      ColMap(const GridGraph& graph) : _graph(graph) {}
    546547
    547548      /// \brief The subscript operator
    548       ///
    549       /// The subscript operator.
    550549      Value operator[](Key key) const {
    551550        return _graph.col(key);
     
    567566
    568567      /// \brief Constructor
    569       ///
    570       /// Constructor
    571568      RowMap(const GridGraph& graph) : _graph(graph) {}
    572569
    573570      /// \brief The subscript operator
    574       ///
    575       /// The subscript operator.
    576571      Value operator[](Key key) const {
    577572        return _graph.row(key);
     
    584579    /// \brief Constructor
    585580    ///
    586     /// Construct a grid graph with given size.
     581    /// Construct a grid graph with the given size.
    587582    GridGraph(int width, int height) { construct(width, height); }
    588583
    589     /// \brief Resize the graph
    590     ///
    591     /// Resize the graph. The function will fully destroy and rebuild
    592     /// the graph.  This cause that the maps of the graph will
    593     /// reallocated automatically and the previous values will be
    594     /// lost.
     584    /// \brief Resizes the graph
     585    ///
     586    /// This function resizes the graph. It fully destroys and
     587    /// rebuilds the structure, therefore the maps of the graph will be
     588    /// reallocated automatically and the previous values will be lost.
    595589    void resize(int width, int height) {
    596590      Parent::notifier(Arc()).clear();
     
    610604    }
    611605
    612     /// \brief Gives back the column index of the node.
     606    /// \brief The column index of the node.
    613607    ///
    614608    /// Gives back the column index of the node.
     
    617611    }
    618612
    619     /// \brief Gives back the row index of the node.
     613    /// \brief The row index of the node.
    620614    ///
    621615    /// Gives back the row index of the node.
     
    624618    }
    625619
    626     /// \brief Gives back the position of the node.
     620    /// \brief The position of the node.
    627621    ///
    628622    /// Gives back the position of the node, ie. the <tt>(col,row)</tt> pair.
     
    631625    }
    632626
    633     /// \brief Gives back the number of the columns.
     627    /// \brief The number of the columns.
    634628    ///
    635629    /// Gives back the number of the columns.
     
    638632    }
    639633
    640     /// \brief Gives back the number of the rows.
     634    /// \brief The number of the rows.
    641635    ///
    642636    /// Gives back the number of the rows.
     
    645639    }
    646640
    647     /// \brief Gives back the arc goes right from the node.
     641    /// \brief The arc goes right from the node.
    648642    ///
    649643    /// Gives back the arc goes right from the node. If there is not
     
    653647    }
    654648
    655     /// \brief Gives back the arc goes left from the node.
     649    /// \brief The arc goes left from the node.
    656650    ///
    657651    /// Gives back the arc goes left from the node. If there is not
     
    661655    }
    662656
    663     /// \brief Gives back the arc goes up from the node.
     657    /// \brief The arc goes up from the node.
    664658    ///
    665659    /// Gives back the arc goes up from the node. If there is not
     
    669663    }
    670664
    671     /// \brief Gives back the arc goes down from the node.
     665    /// \brief The arc goes down from the node.
    672666    ///
    673667    /// Gives back the arc goes down from the node. If there is not
Note: See TracChangeset for help on using the changeset viewer.