# HG changeset patch # User deba # Date 1164378283 0 # Node ID cddae1c4fee6dc2d96db6e5c4bfeabbd463bae01 # Parent 558cc308a4bd6b2a0c7cbdb201f31163759fb6d3 Erasing unionfind Item template parameter diff -r 558cc308a4bd -r cddae1c4fee6 lemon/kruskal.h --- a/lemon/kruskal.h Tue Nov 21 18:29:31 2006 +0000 +++ b/lemon/kruskal.h Fri Nov 24 14:24:43 2006 +0000 @@ -118,7 +118,7 @@ typedef typename GR::Node Node; NodeIntMap comp(g); - UnionFind uf(comp); + UnionFind uf(comp); for (typename GR::NodeIt it(g); it != INVALID; ++it) { uf.insert(it); } diff -r 558cc308a4bd -r cddae1c4fee6 lemon/max_matching.h --- a/lemon/max_matching.h Tue Nov 21 18:29:31 2006 +0000 +++ b/lemon/max_matching.h Fri Nov 24 14:24:43 2006 +0000 @@ -66,7 +66,7 @@ typedef typename Graph::IncEdgeIt IncEdgeIt; typedef typename Graph::template NodeMap UFECrossRef; - typedef UnionFindEnum UFE; + typedef UnionFindEnum UFE; public: diff -r 558cc308a4bd -r cddae1c4fee6 lemon/unionfind.h --- a/lemon/unionfind.h Tue Nov 21 18:29:31 2006 +0000 +++ b/lemon/unionfind.h Fri Nov 24 14:24:43 2006 +0000 @@ -33,9 +33,8 @@ namespace lemon { - //! \addtogroup auxdat - //! @{ - + /// \ingroup auxdat + /// /// \brief A \e Union-Find data structure implementation /// /// The class implements the \e Union-Find data structure. @@ -51,11 +50,12 @@ /// /// \pre You need to add all the elements by the \ref insert() /// method. - template + template class UnionFind { - public: - typedef Item ElementType; + + typedef _ItemIntMap ItemIntMap; + typedef typename ItemIntMap::Key Item; private: // If the items vector stores negative value for an item then @@ -146,7 +146,8 @@ }; - + /// \ingroup auxdat + /// /// \brief A \e Union-Find data structure implementation which /// is able to enumerate the components. /// @@ -161,13 +162,13 @@ /// \pre You need to add all the elements by the \ref insert() /// method. /// - template + template class UnionFindEnum { public: - typedef _Item Item; typedef _ItemIntMap ItemIntMap; - + typedef typename ItemIntMap::Key Item; + private: // If the parent stores negative value for an item then that item diff -r 558cc308a4bd -r cddae1c4fee6 test/unionfind_test.cc --- a/test/unionfind_test.cc Tue Nov 21 18:29:31 2006 +0000 +++ b/test/unionfind_test.cc Fri Nov 24 14:24:43 2006 +0000 @@ -25,7 +25,7 @@ using namespace lemon; using namespace std; -typedef UnionFindEnum > UFE; +typedef UnionFindEnum > UFE; void print(UFE const &ufe) { cout << "Print the classes of the structure:" << endl;