COIN-OR::LEMON - Graph Library

source: lemon-0.x/lemon/bits/clearable_graph_extender.h @ 1910:f95eea8c34b0

Last change on this file since 1910:f95eea8c34b0 was 1910:f95eea8c34b0, checked in by Balazs Dezso, 18 years ago

Bipartite => Bp
Upper => A
Lower => B

+ some bug fix

File size: 2.4 KB
RevLine 
[946]1// -*- c++ -*-
2
3#ifndef LEMON_CLEARABLE_GRAPH_EXTENDER_H
4#define LEMON_CLEARABLE_GRAPH_EXTENDER_H
5
6#include <lemon/invalid.h>
7
8
9namespace lemon {
10
11  template <typename _Base>
12  class ClearableGraphExtender : public _Base {
13  public:
14
15    typedef ClearableGraphExtender Graph;
16    typedef _Base Parent;
[980]17    typedef typename Parent::Node Node;
18    typedef typename Parent::Edge Edge;
[946]19
20    void clear() {
[1039]21      Parent::getNotifier(Node()).clear();
22      Parent::getNotifier(Edge()).clear();
[946]23      Parent::clear();
24    }
25
26  };
27
[1022]28  template <typename _Base>
[1842]29  class ClearableEdgeSetExtender : public _Base {
30  public:
31
32    typedef ClearableEdgeSetExtender Graph;
33    typedef _Base Parent;
34    typedef typename Parent::Node Node;
35    typedef typename Parent::Edge Edge;
36
37    void clear() {
38      Parent::getNotifier(Edge()).clear();
39      Parent::clear();
40    }
41
42  };
43
44  template <typename _Base>
[1909]45  class ClearableUGraphExtender : public _Base {
[1022]46  public:
47
[1909]48    typedef ClearableUGraphExtender Graph;
[1022]49    typedef _Base Parent;
50    typedef typename Parent::Node Node;
[1909]51    typedef typename Parent::UEdge UEdge;
[1022]52    typedef typename Parent::Edge Edge;
53
54    void clear() {
[1039]55      Parent::getNotifier(Node()).clear();
[1909]56      Parent::getNotifier(UEdge()).clear();
[1039]57      Parent::getNotifier(Edge()).clear();
[1022]58      Parent::clear();
59    }
[1842]60  };
61
62  template <typename _Base>
[1909]63  class ClearableUEdgeSetExtender : public _Base {
[1842]64  public:
65
[1909]66    typedef ClearableUEdgeSetExtender Graph;
[1842]67    typedef _Base Parent;
68    typedef typename Parent::Node Node;
[1909]69    typedef typename Parent::UEdge UEdge;
[1842]70    typedef typename Parent::Edge Edge;
71
72    void clear() {
[1909]73      Parent::getNotifier(UEdge()).clear();
[1842]74      Parent::getNotifier(Edge()).clear();
75      Parent::clear();
76    }
[1022]77
78  };
79
[1820]80
81  template <typename _Base>
[1910]82  class ClearableBpUGraphExtender : public _Base {
[1820]83  public:
84
85    typedef _Base Parent;
[1910]86    typedef ClearableBpUGraphExtender Graph;
[1820]87
88    typedef typename Parent::Node Node;
[1910]89    typedef typename Parent::BNode BNode;
90    typedef typename Parent::ANode ANode;
[1820]91    typedef typename Parent::Edge Edge;
[1909]92    typedef typename Parent::UEdge UEdge;
[1820]93
94    void clear() {
95      Parent::getNotifier(Edge()).clear();
[1909]96      Parent::getNotifier(UEdge()).clear();
[1820]97      Parent::getNotifier(Node()).clear();
[1910]98      Parent::getNotifier(BNode()).clear();
99      Parent::getNotifier(ANode()).clear();
[1820]100      Parent::clear();
101    }
102
103  };
104
[946]105}
106
107#endif
Note: See TracBrowser for help on using the repository browser.