diff -r a2dda876316f -r 9285f3777553 lemon/full_graph.h --- a/lemon/full_graph.h Thu Aug 18 12:22:44 2005 +0000 +++ b/lemon/full_graph.h Thu Aug 18 13:33:49 2005 +0000 @@ -125,10 +125,10 @@ protected: int id; - Node(int _id) { id = _id;} + Node(int _id) : id(_id) {} public: Node() {} - Node (Invalid) { id = -1; } + Node (Invalid) : id(-1) {} bool operator==(const Node node) const {return id == node.id;} bool operator!=(const Node node) const {return id != node.id;} bool operator<(const Node node) const {return id < node.id;} @@ -260,12 +260,12 @@ Node source(Edge e) const { /// \todo we may do it faster - return ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2; + return Node(((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2); } Node target(Edge e) const { int source = ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;; - return e.id - (source) * (source - 1) / 2; + return Node(e.id - (source) * (source - 1) / 2); }