lemon/list_graph.h
branch1.0
changeset 1078 c59bdcc8e33e
parent 313 64f8f7cc6168
equal deleted inserted replaced
14:9e256629a3f0 30:bde2d3ca2434
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library.
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     4  *
     5  * Copyright (C) 2003-2008
     5  * Copyright (C) 2003-2011
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     8  *
     9  * Permission to use, modify and distribute this software is granted
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    10  * provided that this copyright notice appears in all copies. For
   838 
   838 
   839       int id;
   839       int id;
   840       explicit Arc(int pid) { id = pid;}
   840       explicit Arc(int pid) { id = pid;}
   841 
   841 
   842     public:
   842     public:
   843       operator Edge() const { 
   843       operator Edge() const {
   844         return id != -1 ? edgeFromId(id / 2) : INVALID; 
   844         return id != -1 ? edgeFromId(id / 2) : INVALID;
   845       }
   845       }
   846 
   846 
   847       Arc() {}
   847       Arc() {}
   848       Arc (Invalid) { id = -1; }
   848       Arc (Invalid) { id = -1; }
   849       bool operator==(const Arc& arc) const {return id == arc.id;}
   849       bool operator==(const Arc& arc) const {return id == arc.id;}