Changeset 1643:9285f3777553 in lemon-0.x for lemon
- Timestamp:
- 08/18/05 15:33:49 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2156
- Location:
- lemon
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concept/graph.h
r1631 r1643 405 405 /// This constructor sets the iterator to the first edge of \c g. 406 406 ///@param g the graph 407 EdgeIt(const StaticGraph& g) { }407 EdgeIt(const StaticGraph& g) { ignore_unused_variable_warning(g); } 408 408 /// Edge -> EdgeIt conversion 409 409 -
lemon/concept/path.h
r1624 r1643 25 25 26 26 #include <lemon/invalid.h> 27 #include <lemon/concept_check.h> 27 28 28 29 namespace lemon { … … 55 56 /// \param _g The graph in which the path is. 56 57 /// 57 Path(const Graph &_g) {} 58 Path(const Graph &_g) { 59 ignore_unused_variable_warning(_g); 60 } 58 61 59 62 /// Length of the path. -
lemon/concept/undir_graph.h
r1631 r1643 558 558 /// This constructor sets the iterator to the first edge of \c g. 559 559 ///@param g the graph 560 EdgeIt(const UndirGraph &g) { }560 EdgeIt(const UndirGraph &g) { ignore_unused_variable_warning(g); } 561 561 /// Edge -> EdgeIt conversion 562 562 … … 606 606 ///@param n the node 607 607 ///@param g the graph 608 OutEdgeIt(const UndirGraph& n, const Node& g) { } 608 OutEdgeIt(const UndirGraph& n, const Node& g) { 609 ignore_unused_variable_warning(n); 610 ignore_unused_variable_warning(g); 611 } 609 612 /// Edge -> OutEdgeIt conversion 610 613 … … 655 658 ///@param n the node 656 659 ///@param g the graph 657 InEdgeIt(const UndirGraph& g, const Node& n) { } 660 InEdgeIt(const UndirGraph& g, const Node& n) { 661 ignore_unused_variable_warning(n); 662 ignore_unused_variable_warning(g); 663 } 658 664 /// Edge -> InEdgeIt conversion 659 665 -
lemon/full_graph.h
r1566 r1643 126 126 protected: 127 127 int id; 128 Node(int _id) { id = _id;}128 Node(int _id) : id(_id) {} 129 129 public: 130 130 Node() {} 131 Node (Invalid) { id = -1;}131 Node (Invalid) : id(-1) {} 132 132 bool operator==(const Node node) const {return id == node.id;} 133 133 bool operator!=(const Node node) const {return id != node.id;} … … 261 261 Node source(Edge e) const { 262 262 /// \todo we may do it faster 263 return ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;263 return Node(((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2); 264 264 } 265 265 266 266 Node target(Edge e) const { 267 267 int source = ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;; 268 return e.id - (source) * (source - 1) / 2;268 return Node(e.id - (source) * (source - 1) / 2); 269 269 } 270 270
Note: See TracChangeset
for help on using the changeset viewer.