COIN-OR::LEMON - Graph Library

source: lemon-0.x/lemon/bits/clearable_graph_extender.h @ 1966:65765fb5eb2f

Last change on this file since 1966:65765fb5eb2f was 1956:a055123339d5, checked in by Alpar Juttner, 18 years ago

Unified copyright notices

File size: 2.9 KB
RevLine 
[1956]1/* -*- C++ -*-
2 *
3 * This file is a part of LEMON, a generic C++ optimization library
4 *
5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
8 *
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
12 *
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
15 * purpose.
16 *
17 */
[946]18
19#ifndef LEMON_CLEARABLE_GRAPH_EXTENDER_H
20#define LEMON_CLEARABLE_GRAPH_EXTENDER_H
21
22#include <lemon/invalid.h>
23
24
25namespace lemon {
26
27  template <typename _Base>
28  class ClearableGraphExtender : public _Base {
29  public:
30
31    typedef ClearableGraphExtender Graph;
32    typedef _Base Parent;
[980]33    typedef typename Parent::Node Node;
34    typedef typename Parent::Edge Edge;
[946]35
36    void clear() {
[1039]37      Parent::getNotifier(Node()).clear();
38      Parent::getNotifier(Edge()).clear();
[946]39      Parent::clear();
40    }
41
42  };
43
[1022]44  template <typename _Base>
[1842]45  class ClearableEdgeSetExtender : public _Base {
46  public:
47
48    typedef ClearableEdgeSetExtender Graph;
49    typedef _Base Parent;
50    typedef typename Parent::Node Node;
51    typedef typename Parent::Edge Edge;
52
53    void clear() {
54      Parent::getNotifier(Edge()).clear();
55      Parent::clear();
56    }
57
58  };
59
60  template <typename _Base>
[1909]61  class ClearableUGraphExtender : public _Base {
[1022]62  public:
63
[1909]64    typedef ClearableUGraphExtender Graph;
[1022]65    typedef _Base Parent;
66    typedef typename Parent::Node Node;
[1909]67    typedef typename Parent::UEdge UEdge;
[1022]68    typedef typename Parent::Edge Edge;
69
70    void clear() {
[1039]71      Parent::getNotifier(Node()).clear();
[1909]72      Parent::getNotifier(UEdge()).clear();
[1039]73      Parent::getNotifier(Edge()).clear();
[1022]74      Parent::clear();
75    }
[1842]76  };
77
78  template <typename _Base>
[1909]79  class ClearableUEdgeSetExtender : public _Base {
[1842]80  public:
81
[1909]82    typedef ClearableUEdgeSetExtender Graph;
[1842]83    typedef _Base Parent;
84    typedef typename Parent::Node Node;
[1909]85    typedef typename Parent::UEdge UEdge;
[1842]86    typedef typename Parent::Edge Edge;
87
88    void clear() {
[1909]89      Parent::getNotifier(UEdge()).clear();
[1842]90      Parent::getNotifier(Edge()).clear();
91      Parent::clear();
92    }
[1022]93
94  };
95
[1820]96
97  template <typename _Base>
[1910]98  class ClearableBpUGraphExtender : public _Base {
[1820]99  public:
100
101    typedef _Base Parent;
[1910]102    typedef ClearableBpUGraphExtender Graph;
[1820]103
104    typedef typename Parent::Node Node;
[1910]105    typedef typename Parent::BNode BNode;
106    typedef typename Parent::ANode ANode;
[1820]107    typedef typename Parent::Edge Edge;
[1909]108    typedef typename Parent::UEdge UEdge;
[1820]109
110    void clear() {
111      Parent::getNotifier(Edge()).clear();
[1909]112      Parent::getNotifier(UEdge()).clear();
[1820]113      Parent::getNotifier(Node()).clear();
[1910]114      Parent::getNotifier(BNode()).clear();
115      Parent::getNotifier(ANode()).clear();
[1820]116      Parent::clear();
117    }
118
119  };
120
[946]121}
122
123#endif
Note: See TracBrowser for help on using the repository browser.