lemon/unionfind.h
changeset 2308 cddae1c4fee6
parent 2205 c20b0eb92a33
child 2332 587531b4fe0e
     1.1 --- a/lemon/unionfind.h	Tue Nov 21 18:29:31 2006 +0000
     1.2 +++ b/lemon/unionfind.h	Fri Nov 24 14:24:43 2006 +0000
     1.3 @@ -33,9 +33,8 @@
     1.4  
     1.5  namespace lemon {
     1.6  
     1.7 -  //! \addtogroup auxdat
     1.8 -  //! @{
     1.9 -
    1.10 +  /// \ingroup auxdat
    1.11 +  ///
    1.12    /// \brief A \e Union-Find data structure implementation
    1.13    ///
    1.14    /// The class implements the \e Union-Find data structure. 
    1.15 @@ -51,11 +50,12 @@
    1.16    ///
    1.17    /// \pre You need to add all the elements by the \ref insert()
    1.18    /// method.  
    1.19 -  template <typename Item, typename ItemIntMap>
    1.20 +  template <typename _ItemIntMap>
    1.21    class UnionFind {
    1.22 -    
    1.23    public:
    1.24 -    typedef Item ElementType;
    1.25 +
    1.26 +    typedef _ItemIntMap ItemIntMap;
    1.27 +    typedef typename ItemIntMap::Key Item;
    1.28  
    1.29    private:
    1.30      // If the items vector stores negative value for an item then
    1.31 @@ -146,7 +146,8 @@
    1.32  
    1.33    };
    1.34  
    1.35 -
    1.36 +  /// \ingroup auxdat
    1.37 +  ///
    1.38    /// \brief A \e Union-Find data structure implementation which
    1.39    /// is able to enumerate the components.
    1.40    ///
    1.41 @@ -161,13 +162,13 @@
    1.42    /// \pre You need to add all the elements by the \ref insert()
    1.43    /// method.
    1.44    ///
    1.45 -  template <typename _Item, typename _ItemIntMap>
    1.46 +  template <typename _ItemIntMap>
    1.47    class UnionFindEnum {
    1.48    public:
    1.49      
    1.50 -    typedef _Item Item;
    1.51      typedef _ItemIntMap ItemIntMap;
    1.52 -    
    1.53 +    typedef typename ItemIntMap::Key Item;
    1.54 +
    1.55    private:
    1.56      
    1.57      // If the parent stores negative value for an item then that item