Default constructor which allocates empty graphs
authordeba
Mon, 27 Feb 2006 15:43:25 +0000
changeset 19878cd6683382e0
parent 1986 9b56cca61e2e
child 1988 875fe3f689e0
Default constructor which allocates empty graphs
lemon/full_graph.h
     1.1 --- a/lemon/full_graph.h	Mon Feb 27 10:36:01 2006 +0000
     1.2 +++ b/lemon/full_graph.h	Mon Feb 27 15:43:25 2006 +0000
     1.3 @@ -228,6 +228,9 @@
     1.4      typedef ExtendedFullGraphBase Parent;
     1.5  
     1.6      /// \brief Constructor
     1.7 +    FullGraph() { construct(0); }
     1.8 +
     1.9 +    /// \brief Constructor
    1.10      ///
    1.11      FullGraph(int n) { construct(n); }
    1.12  
    1.13 @@ -452,6 +455,9 @@
    1.14      typedef ExtendedFullUGraphBase Parent;
    1.15  
    1.16      /// \brief Constructor
    1.17 +    FullUGraph() { construct(0); }
    1.18 +
    1.19 +    /// \brief Constructor
    1.20      FullUGraph(int n) { construct(n); }
    1.21  
    1.22      /// \brief Resize the graph
    1.23 @@ -665,16 +671,25 @@
    1.24  
    1.25      typedef ExtendedFullBpUGraphBase Parent;
    1.26  
    1.27 +    FullBpUGraph() {
    1.28 +      Parent::construct(0, 0);
    1.29 +    }
    1.30 +
    1.31      FullBpUGraph(int aNodeNum, int bNodeNum) {
    1.32        Parent::construct(aNodeNum, bNodeNum);
    1.33      }
    1.34 +
    1.35      /// \brief Resize the graph
    1.36      ///
    1.37      void resize(int n, int m) {
    1.38        Parent::getNotifier(Edge()).clear();
    1.39        Parent::getNotifier(UEdge()).clear();
    1.40        Parent::getNotifier(Node()).clear();
    1.41 +      Parent::getNotifier(ANode()).clear();
    1.42 +      Parent::getNotifier(BNode()).clear();
    1.43        construct(n, m);
    1.44 +      Parent::getNotifier(ANode()).build();
    1.45 +      Parent::getNotifier(BNode()).build();
    1.46        Parent::getNotifier(Node()).build();
    1.47        Parent::getNotifier(UEdge()).build();
    1.48        Parent::getNotifier(Edge()).build();