diff -r ef2d00e46897 -r c2992fd74dad lemon/full_graph.h --- a/lemon/full_graph.h Wed Feb 22 12:45:59 2006 +0000 +++ b/lemon/full_graph.h Wed Feb 22 18:26:56 2006 +0000 @@ -22,11 +22,9 @@ #include -#include -#include -#include #include + #include #include @@ -191,10 +189,7 @@ }; - typedef StaticMappableGraphExtender< - IterableGraphExtender< - AlterableGraphExtender< - GraphExtender > > > ExtendedFullGraphBase; + typedef GraphExtender ExtendedFullGraphBase; /// \ingroup graphs /// @@ -211,7 +206,21 @@ class FullGraph : public ExtendedFullGraphBase { public: + typedef ExtendedFullGraphBase Parent; + + /// \brief Constructor + /// FullGraph(int n) { construct(n); } + + /// \brief Resize the graph + /// + void resize(int n) { + Parent::getNotifier(Edge()).clear(); + Parent::getNotifier(Node()).clear(); + construct(n); + Parent::getNotifier(Node()).build(); + Parent::getNotifier(Edge()).build(); + } }; @@ -379,10 +388,8 @@ }; - typedef StaticMappableUGraphExtender< - IterableUGraphExtender< - AlterableUGraphExtender< - UGraphExtender > > > ExtendedFullUGraphBase; + typedef UGraphExtender > + ExtendedFullUGraphBase; /// \ingroup graphs /// @@ -401,7 +408,23 @@ /// \author Balazs Dezso class FullUGraph : public ExtendedFullUGraphBase { public: + + typedef ExtendedFullUGraphBase Parent; + + /// \brief Constructor FullUGraph(int n) { construct(n); } + + /// \brief Resize the graph + /// + void resize(int n) { + Parent::getNotifier(Edge()).clear(); + Parent::getNotifier(UEdge()).clear(); + Parent::getNotifier(Node()).clear(); + construct(n); + Parent::getNotifier(Node()).build(); + Parent::getNotifier(UEdge()).build(); + Parent::getNotifier(Edge()).build(); + } }; @@ -577,12 +600,8 @@ }; - typedef StaticMappableBpUGraphExtender< - IterableBpUGraphExtender< - AlterableBpUGraphExtender< - BpUGraphExtender < - FullBpUGraphBase> > > > - ExtendedFullBpUGraphBase; + typedef BpUGraphExtender< BpUGraphBaseExtender< + FullBpUGraphBase> > ExtendedFullBpUGraphBase; /// \ingroup graphs @@ -599,10 +618,23 @@ class FullBpUGraph : public ExtendedFullBpUGraphBase { public: + typedef ExtendedFullBpUGraphBase Parent; + FullBpUGraph(int aNodeNum, int bNodeNum) { Parent::construct(aNodeNum, bNodeNum); } + /// \brief Resize the graph + /// + void resize(int n, int m) { + Parent::getNotifier(Edge()).clear(); + Parent::getNotifier(UEdge()).clear(); + Parent::getNotifier(Node()).clear(); + construct(n, m); + Parent::getNotifier(Node()).build(); + Parent::getNotifier(UEdge()).build(); + Parent::getNotifier(Edge()).build(); + } }; } //namespace lemon