COIN-OR::LEMON - Graph Library

Changeset 177:924f9555711d in lemon-0.x for src/work


Ignore:
Timestamp:
03/12/04 16:42:51 (21 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@253
Message:

Marci's changes accepted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/alpar/smart_graph.h

    r174 r177  
    1212
    1313  class SmartGraph {
    14 
    15 //     static const int INVALID=-1;
    16 //     static const int INVALID_NODE=INT_MAX;
    1714
    1815    struct NodeT
     
    117114
    118115    template< typename It >
    119     It first() const {
    120       It e;
    121       //Marci
    122       /*getF*/first(e);
    123       return e;
    124     }
     116    It first() const { It e; first(e); return e; }
    125117
    126118    template< typename It >
    127     It first(Node v) const {
    128       It e;
    129       //Marci
    130       /*getF*/first(e, v);
    131       return e;
    132     }
     119    It first(Node v) const { It e; first(e,v); return e; }
    133120
    134121    bool valid(Edge e) const { return e.n!=-1; }
    135     //    bool valid(EdgeIt e) const { return e.n<int(edges.size()); }
    136122    bool valid(Node n) const { return n.n!=-1; }
    137123   
     
    141127    template <typename It> It getNext(It it) const
    142128    { It tmp(it); return next(tmp); }
    143     //{ It tmp; tmp.n=it.n+1; return tmp; }
    144 
    145     //FIXME correction Marci: I changed to NodeIt from Node
    146     //NodeIt& next(NodeIt& it) const { it.n=(it.n+2)%nodes.size()-1; return it; }
     129
    147130    NodeIt& next(NodeIt& it) const {
    148131      it.n=(it.n+2)%(nodes.size()+1)-1;
     
    226209    public:
    227210      Edge() { }
    228       // Marci: kiszedtem az Invalid i-bol az i-t
    229211      Edge (Invalid) { n=-1; }
    230212      bool operator==(const Edge i) const {return n==i.n;}
     
    331313        if(k.n>=container.size()) container.resize(k.n+1);
    332314      }
     315
    333316//       void erase(const Node k)
    334317//       {
Note: See TracChangeset for help on using the changeset viewer.