COIN-OR::LEMON - Graph Library

Changeset 606:c5fd2d996909 in lemon for lemon/unionfind.h


Ignore:
Timestamp:
03/29/09 23:08:20 (16 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Various doc improvements (#248)

  • Rename all the ugly template parameters (too long and/or starting with an underscore).
  • Rename function parameters starting with an underscore.
  • Extend the doc for many classes.
  • Use LaTeX-style O(...) expressions only for the complicated ones.
  • A lot of small unification changes.
  • Small fixes.
  • Some other improvements.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/unionfind.h

    r463 r606  
    5252  /// \pre You need to add all the elements by the \ref insert()
    5353  /// method.
    54   template <typename _ItemIntMap>
     54  template <typename IM>
    5555  class UnionFind {
    5656  public:
    5757
    58     typedef _ItemIntMap ItemIntMap;
     58    ///\e
     59    typedef IM ItemIntMap;
     60    ///\e
    5961    typedef typename ItemIntMap::Key Item;
    6062
     
    171173  /// method.
    172174  ///
    173   template <typename _ItemIntMap>
     175  template <typename IM>
    174176  class UnionFindEnum {
    175177  public:
    176178
    177     typedef _ItemIntMap ItemIntMap;
     179    ///\e
     180    typedef IM ItemIntMap;
     181    ///\e
    178182    typedef typename ItemIntMap::Key Item;
    179183
     
    628632  /// \pre You need to add all the elements by the \ref insert()
    629633  /// method.
    630   template <typename _ItemIntMap>
     634  template <typename IM>
    631635  class ExtendFindEnum {
    632636  public:
    633637
    634     typedef _ItemIntMap ItemIntMap;
     638    ///\e
     639    typedef IM ItemIntMap;
     640    ///\e
    635641    typedef typename ItemIntMap::Key Item;
    636642
     
    949955  /// \pre You need to add all the elements by the \ref insert()
    950956  /// 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> >
    954958  class HeapUnionFind {
    955959  public:
    956960
    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;
    963969
    964970  private:
     
    16021608    /// \brief Gives back the priority of the current item.
    16031609    ///
    1604     /// \return Gives back the priority of the current item.
     1610    /// Gives back the priority of the current item.
    16051611    const Value& operator[](const Item& item) const {
    16061612      return nodes[index[item]].prio;
     
    16471653    /// \brief Gives back the minimum priority of the class.
    16481654    ///
    1649     /// \return Gives back the minimum priority of the class.
     1655    /// Gives back the minimum priority of the class.
    16501656    const Value& classPrio(int cls) const {
    16511657      return nodes[~(classes[cls].parent)].prio;
     
    16611667    /// \brief Gives back a representant item of the class.
    16621668    ///
     1669    /// Gives back a representant item of the class.
    16631670    /// The representant is indpendent from the priorities of the
    16641671    /// items.
    1665     /// \return Gives back a representant item of the class.
    16661672    const Item& classRep(int id) const {
    16671673      int parent = classes[id].parent;
Note: See TracChangeset for help on using the changeset viewer.