Changeset 606:c5fd2d996909 in lemon for lemon/unionfind.h
 Timestamp:
 03/29/09 23:08:20 (10 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/unionfind.h
r463 r606 52 52 /// \pre You need to add all the elements by the \ref insert() 53 53 /// method. 54 template <typename _ItemIntMap>54 template <typename IM> 55 55 class UnionFind { 56 56 public: 57 57 58 typedef _ItemIntMap ItemIntMap; 58 ///\e 59 typedef IM ItemIntMap; 60 ///\e 59 61 typedef typename ItemIntMap::Key Item; 60 62 … … 171 173 /// method. 172 174 /// 173 template <typename _ItemIntMap>175 template <typename IM> 174 176 class UnionFindEnum { 175 177 public: 176 178 177 typedef _ItemIntMap ItemIntMap; 179 ///\e 180 typedef IM ItemIntMap; 181 ///\e 178 182 typedef typename ItemIntMap::Key Item; 179 183 … … 628 632 /// \pre You need to add all the elements by the \ref insert() 629 633 /// method. 630 template <typename _ItemIntMap>634 template <typename IM> 631 635 class ExtendFindEnum { 632 636 public: 633 637 634 typedef _ItemIntMap ItemIntMap; 638 ///\e 639 typedef IM ItemIntMap; 640 ///\e 635 641 typedef typename ItemIntMap::Key Item; 636 642 … … 949 955 /// \pre You need to add all the elements by the \ref insert() 950 956 /// method. 951 /// 952 template <typename _Value, typename _ItemIntMap, 953 typename _Comp = std::less<_Value> > 957 template <typename V, typename IM, typename Comp = std::less<V> > 954 958 class HeapUnionFind { 955 959 public: 956 960 957 typedef _Value Value; 958 typedef typename _ItemIntMap::Key Item; 959 960 typedef _ItemIntMap ItemIntMap; 961 962 typedef _Comp Comp; 961 ///\e 962 typedef V Value; 963 ///\e 964 typedef typename IM::Key Item; 965 ///\e 966 typedef IM ItemIntMap; 967 ///\e 968 typedef Comp Compare; 963 969 964 970 private: … … 1602 1608 /// \brief Gives back the priority of the current item. 1603 1609 /// 1604 /// \returnGives back the priority of the current item.1610 /// Gives back the priority of the current item. 1605 1611 const Value& operator[](const Item& item) const { 1606 1612 return nodes[index[item]].prio; … … 1647 1653 /// \brief Gives back the minimum priority of the class. 1648 1654 /// 1649 /// \returnGives back the minimum priority of the class.1655 /// Gives back the minimum priority of the class. 1650 1656 const Value& classPrio(int cls) const { 1651 1657 return nodes[~(classes[cls].parent)].prio; … … 1661 1667 /// \brief Gives back a representant item of the class. 1662 1668 /// 1669 /// Gives back a representant item of the class. 1663 1670 /// The representant is indpendent from the priorities of the 1664 1671 /// items. 1665 /// \return Gives back a representant item of the class.1666 1672 const Item& classRep(int id) const { 1667 1673 int parent = classes[id].parent;
Note: See TracChangeset
for help on using the changeset viewer.