COIN-OR::LEMON - Graph Library

Changeset 238:79643f6e8c52 in lemon-1.2


Ignore:
Timestamp:
07/29/08 13:58:03 (11 years ago)
Author:
Balazs Dezso <deba@…>
Branch:
default
Phase:
public
Message:

Converting INVALID arc to INVALID edge

Location:
lemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/list_graph.h

    r234 r238  
    843843
    844844    public:
    845       operator Edge() const { return edgeFromId(id / 2); }
     845      operator Edge() const {
     846        return id != -1 ? edgeFromId(id / 2) : INVALID;
     847      }
    846848
    847849      Arc() {}
  • lemon/smart_graph.h

    r220 r238  
    466466
    467467    public:
    468       operator Edge() const { return edgeFromId(_id / 2); }
     468      operator Edge() const {
     469        return _id != -1 ? edgeFromId(_id / 2) : INVALID;
     470      }
    469471
    470472      Arc() {}
Note: See TracChangeset for help on using the changeset viewer.