Changes in lemon/static_graph.h [779:c160bf9f18ef:777:5764dd9b6e18] in lemon-1.2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/static_graph.h
r779 r777 93 93 void nextIn(Arc& e) const { e.id = arc_next_in[e.id]; } 94 94 95 static int id(const Node& n){ return n.id; }96 static Node nodeFromId(int id){ return Node(id); }95 int id(const Node& n) const { return n.id; } 96 Node nodeFromId(int id) const { return Node(id); } 97 97 int maxNodeId() const { return node_num - 1; } 98 98 99 static int id(const Arc& e){ return e.id; }100 static Arc arcFromId(int id){ return Arc(id); }99 int id(const Arc& e) const { return e.id; } 100 Arc arcFromId(int id) const { return Arc(id); } 101 101 int maxArcId() const { return arc_num - 1; } 102 102 … … 310 310 /// This function returns the node with the given index. 311 311 /// \sa index() 312 static Node node(int ix){ return Parent::nodeFromId(ix); }312 Node node(int ix) const { return Parent::nodeFromId(ix); } 313 313 314 314 /// \brief The arc with the given index. … … 316 316 /// This function returns the arc with the given index. 317 317 /// \sa index() 318 static Arc arc(int ix){ return Parent::arcFromId(ix); }318 Arc arc(int ix) const { return Parent::arcFromId(ix); } 319 319 320 320 /// \brief The index of the given node. … … 322 322 /// This function returns the index of the the given node. 323 323 /// \sa node() 324 static int index(Node node){ return Parent::id(node); }324 int index(Node node) const { return Parent::id(node); } 325 325 326 326 /// \brief The index of the given arc. … … 328 328 /// This function returns the index of the the given arc. 329 329 /// \sa arc() 330 static int index(Arc arc){ return Parent::id(arc); }330 int index(Arc arc) const { return Parent::id(arc); } 331 331 332 332 /// \brief Number of nodes.
Note: See TracChangeset
for help on using the changeset viewer.