lemon/grid_graph.h
changeset 403 940587667b47
parent 338 b77fb8c32707
child 440 88ed40ad0d4f
equal deleted inserted replaced
3:5647206bd810 4:99747d275531
    80     int height() const {
    80     int height() const {
    81       return _height;
    81       return _height;
    82     }
    82     }
    83 
    83 
    84     typedef True NodeNumTag;
    84     typedef True NodeNumTag;
       
    85     typedef True EdgeNumTag;
    85     typedef True ArcNumTag;
    86     typedef True ArcNumTag;
    86 
    87 
    87     int nodeNum() const { return _node_num; }
    88     int nodeNum() const { return _node_num; }
    88     int edgeNum() const { return _edge_num; }
    89     int edgeNum() const { return _edge_num; }
    89     int arcNum() const { return 2 * _edge_num; }
    90     int arcNum() const { return 2 * _edge_num; }
   125     static Node nodeFromId(int id) { return Node(id);}
   126     static Node nodeFromId(int id) { return Node(id);}
   126     static Edge edgeFromId(int id) { return Edge(id);}
   127     static Edge edgeFromId(int id) { return Edge(id);}
   127     static Arc arcFromId(int id) { return Arc(id);}
   128     static Arc arcFromId(int id) { return Arc(id);}
   128 
   129 
   129     typedef True FindEdgeTag;
   130     typedef True FindEdgeTag;
       
   131     typedef True FindArcTag;
   130 
   132 
   131     Edge findEdge(Node u, Node v, Edge prev = INVALID) const {
   133     Edge findEdge(Node u, Node v, Edge prev = INVALID) const {
   132       if (prev != INVALID) return INVALID;
   134       if (prev != INVALID) return INVALID;
   133       if (v._id > u._id) {
   135       if (v._id > u._id) {
   134         if (v._id - u._id == _width)
   136         if (v._id - u._id == _width)