lemon/unionfind.h
changeset 867 5b926cc36a4b
parent 559 c5fd2d996909
child 875 07ec2b52e53d
     1.1 --- a/lemon/unionfind.h	Thu Oct 15 21:04:50 2009 +0200
     1.2 +++ b/lemon/unionfind.h	Tue Mar 16 21:12:10 2010 +0100
     1.3 @@ -739,7 +739,7 @@
     1.4      /// Erase each item from the data structure.
     1.5      void clear() {
     1.6        items.clear();
     1.7 -      classes.clear;
     1.8 +      classes.clear();
     1.9        firstClass = firstFreeClass = firstFreeItem = -1;
    1.10      }
    1.11  
    1.12 @@ -1288,6 +1288,15 @@
    1.13        : index(_index), first_class(-1),
    1.14          first_free_class(-1), first_free_node(-1) {}
    1.15  
    1.16 +    /// \brief Clears the union-find data structure
    1.17 +    ///
    1.18 +    /// Erase each item from the data structure.
    1.19 +    void clear() {
    1.20 +      nodes.clear();
    1.21 +      classes.clear();
    1.22 +      first_free_node = first_free_class = first_class = -1;
    1.23 +    }
    1.24 +
    1.25      /// \brief Insert a new node into a new component.
    1.26      ///
    1.27      /// Insert a new node into a new component.