COIN-OR::LEMON - Graph Library

Changeset 1643:9285f3777553 in lemon-0.x for lemon/full_graph.h


Ignore:
Timestamp:
08/18/05 15:33:49 (14 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2156
Message:
  • The number of gcc-4.0 warnings has significantly decreases.
  • Some code clean-up in gui
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/full_graph.h

    r1566 r1643  
    126126    protected:
    127127      int id;
    128       Node(int _id) { id = _id;}
     128      Node(int _id) : id(_id) {}
    129129    public:
    130130      Node() {}
    131       Node (Invalid) { id = -1; }
     131      Node (Invalid) : id(-1) {}
    132132      bool operator==(const Node node) const {return id == node.id;}
    133133      bool operator!=(const Node node) const {return id != node.id;}
     
    261261    Node source(Edge e) const {
    262262      /// \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);
    264264    }
    265265
    266266    Node target(Edge e) const {
    267267      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);
    269269    }
    270270
Note: See TracChangeset for help on using the changeset viewer.