equal
deleted
inserted
replaced
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 |
464 |
464 |
465 int _id; |
465 int _id; |
466 explicit Arc(int id) { _id = id;} |
466 explicit Arc(int id) { _id = id;} |
467 |
467 |
468 public: |
468 public: |
469 operator Edge() const { |
469 operator Edge() const { |
470 return _id != -1 ? edgeFromId(_id / 2) : INVALID; |
470 return _id != -1 ? edgeFromId(_id / 2) : INVALID; |
471 } |
471 } |
472 |
472 |
473 Arc() {} |
473 Arc() {} |
474 Arc (Invalid) { _id = -1; } |
474 Arc (Invalid) { _id = -1; } |
475 bool operator==(const Arc& arc) const {return _id == arc._id;} |
475 bool operator==(const Arc& arc) const {return _id == arc._id;} |