COIN-OR::LEMON - Graph Library

Changeset 1791:62e7d237e1fb in lemon-0.x for lemon/grid_graph.h


Ignore:
Timestamp:
11/14/05 19:38:41 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2332
Message:

Modification on the base graph concept
The extended interface does not changed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/grid_graph.h

    r1703 r1791  
    2525#include <lemon/bits/alteration_notifier.h>
    2626#include <lemon/bits/static_map.h>
    27 
    28 #include <lemon/bits/undir_graph_extender.h>
     27#include <lemon/bits/graph_extender.h>
    2928
    3029#include <lemon/xy.h>
     
    165164    /// Maximum node ID.
    166165    ///\sa id(Node)
    167     int maxId(Node = INVALID) const { return nodeNum() - 1; }
     166    int maxNodeId() const { return nodeNum() - 1; }
    168167    /// Maximum edge ID.
    169168   
    170169    /// Maximum edge ID.
    171170    ///\sa id(Edge)
    172     int maxId(Edge = INVALID) const { return edgeNum() - 1; }
     171    int maxEdgeId() const { return edgeNum() - 1; }
    173172
    174173    /// \brief Gives back the source node of an edge.
     
    216215    static int id(Edge e) { return e.id; }
    217216
    218     static Node fromId(int id, Node) { return Node(id);}
    219    
    220     static Edge fromId(int id, Edge) { return Edge(id);}
     217    static Node nodeFromId(int id) { return Node(id);}
     218   
     219    static Edge edgeFromId(int id) { return Edge(id);}
    221220
    222221    typedef True FindEdgeTag;
     
    359358  /// GridGraph graph(h, w);
    360359  /// GridGraph::NodeMap<int> val(graph);
    361   /// for (int i = 0; i < graph.height(); ++i) {
    362   ///   for (int j = 0; j < graph.width(); ++j) {
     360  /// for (int i = 0; i < graph.width(); ++i) {
     361  ///   for (int j = 0; j < graph.height(); ++j) {
    363362  ///     val[graph(i, j)] = i + j;
    364363  ///   }
     
    504503  /// \brief Row map of the grid graph
    505504  ///
    506   /// Just returns an RowMap for the grid graph.
     505  /// Just returns a RowMap for the grid graph.
    507506  GridGraph::RowMap rowMap(const GridGraph& graph) {
    508507    return GridGraph::RowMap(graph);
    509508  }
    510509
    511   /// \brief Coloumn map of the grid graph
    512   ///
    513   /// Just returns an ColMap for the grid graph.
     510  /// \brief Column map of the grid graph
     511  ///
     512  /// Just returns a ColMap for the grid graph.
    514513  GridGraph::ColMap colMap(const GridGraph& graph) {
    515514    return GridGraph::ColMap(graph);
Note: See TracChangeset for help on using the changeset viewer.