Changeset 4065


Ignore:
Timestamp:
Aug 5, 2021, 8:11:05 AM (11 months ago)
Author:
Peter
Message:

fix documentation; refs #710

Location:
branches/kendall-score/yat/utility
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/kendall-score/yat/utility/Ranking.h

    r4064 r4065  
    3838namespace utility {
    3939
     40  /**
     41     Class is a binary tree with the special extension that it allow
     42     fast access to the rank of an element in the tree.
     43   */
    4044  template<typename T, class Compare = std::less<T> >
    4145  class Ranking
    4246  {
    4347  public:
     48    /// value type
    4449    typedef T value_type;
     50    /// type used to compare elements
    4551    typedef Compare key_compare;
     52    /// size type
    4653    typedef size_t size_type;
    47 
     54    /// iterator
    4855    typedef ranking::Iterator<T> iterator;
     56    /// iterator
    4957    typedef ranking::Iterator<T> const_iterator;
     58    /// reverse iterator
    5059    typedef std::reverse_iterator<iterator> reverse_iterator;
     60    /// reverse iterator
    5161    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
    5262
     
    6676
    6777
     78    /**
     79       \brief Copy constructor
     80     */
    6881    Ranking(const Ranking& other)
    6982      : compare_(other.compare())
     
    7285        impl_.head_.parent_ = copy(other);
    7386    }
     87
     88    /**
     89       \brief move constructor
     90     */
    7491    Ranking(Ranking&& other) = default;
     92
     93    /**
     94       \brief assignment operator
     95     */
    7596    Ranking& operator=(const Ranking& other);
     97
     98    /**
     99       \brief move assignment
     100     */
    76101    Ranking& operator=(Ranking&& other);
    77102
    78103
     104    /**
     105       \return iterator pointing to the first element
     106     */
    79107    iterator begin(void)
    80108    {
     
    83111
    84112
     113    /**
     114       \return iterator pointing to the first element
     115     */
    85116    const_iterator begin(void) const
    86117    {
     
    89120
    90121
     122    /**
     123       \return iterator pointing to the first element
     124     */
    91125    const_iterator cbegin(void) const
    92126    {
     
    95129
    96130
     131    /**
     132       \return iterator pointing to one-passed-last element
     133     */
    97134    iterator end(void)
    98135    {
     
    101138
    102139
     140    /**
     141       \return iterator pointing to one-passed-last element
     142     */
    103143    const_iterator end(void) const
    104144    {
     
    107147
    108148
     149    /**
     150       \return iterator pointing to one-passed-last element
     151     */
    109152    const_iterator cend(void) const
    110153    {
     
    113156
    114157
     158    /**
     159       \return reverse iterator pointing to first element
     160     */
    115161    reverse_iterator rbegin(void)
    116162    {
     
    119165
    120166
     167    /**
     168       \return reverse iterator pointing to one-passed-last element
     169     */
    121170    reverse_iterator rend(void)
    122171    {
     
    125174
    126175
     176    /**
     177       \return reverse iterator pointing to one-passed-last element
     178     */
    127179    const_reverse_iterator rend(void) const
    128180    {
     
    131183
    132184
     185    /**
     186       \return reverse iterator pointing to first element
     187     */
    133188    const_reverse_iterator rbegin(void) const
    134189    {
     
    137192
    138193
     194    /**
     195       \return reverse iterator pointing to first element
     196     */
    139197    const_reverse_iterator crbegin(void) const
    140198    {
     
    142200    }
    143201
    144 
     202    /**
     203       \return reverse iterator pointing to the one-passed-last element
     204     */
    145205    const_reverse_iterator crend(void) const
    146206    {
     
    149209
    150210
     211    /**
     212       access comparison function which is used to sort elements
     213     */
    151214    const Compare& compare(void) const
    152215    {
     
    155218
    156219
     220    /**
     221       \return true if (and only if) container has zero elements
     222     */
    157223    bool empty(void) const
    158224    {
     
    161227
    162228
     229    /**
     230       Find an element that is equivalent to x
     231     */
    163232    const_iterator find(const T& x) const;
    164233
    165234
     235    /**
     236       \brief insert an element
     237     */
    166238    iterator insert(const T& element)
    167239    {
     
    172244
    173245
     246    /**
     247       \brief insert an element
     248     */
    174249    iterator insert(T&& element)
    175250    {
     
    180255
    181256
     257    /**
     258       \brief insert with hint
     259     */
    182260    iterator insert(const_iterator hint, const T& element)
    183261    {
     
    187265
    188266
     267    /**
     268       \brief insert with hint
     269     */
    189270    iterator insert(const_iterator hint,  T&& element)
    190271    {
     
    194275
    195276
     277    /**
     278       \brief insert range
     279     */
    196280    template<typename InputIterator>
    197281    void insert(InputIterator first, InputIterator last)
     
    202286
    203287
     288    /**
     289       \return the first element which is equal (or greater) to \c x
     290     */
    204291    const_iterator lower_bound(const T& x) const
    205292    {
     
    210297
    211298
     299    /**
     300       \return the first element which is greater than \c x
     301     */
    212302    const_iterator upper_bound(const T& x) const
    213303    {
     
    218308
    219309
     310    /**
     311       \return number of elements smaller than \c it
     312     */
    220313    size_t ranking(const_iterator it) const
    221314    {
     
    225318
    226319
     320    /**
     321       \return number of elements in container
     322     */
    227323    size_t size(void) const
    228324    {
  • branches/kendall-score/yat/utility/ranking/Impl.h

    r4064 r4065  
    2323*/
    2424
     25// This is a private file used by "yat/utility/Ranking.h"
     26
    2527#include "NodeBase.h"
    2628
     
    3032namespace yat {
    3133namespace utility {
     34
     35  /// \cond IGNORE_DOXYGEN
    3236
    3337  // namespace for internal classes used in class Ranking
     
    5559  } // end of namespace ranking
    5660
     61  /// \endcond
     62
    5763}}} // of namespace utility, yat, and theplu
    5864#endif
  • branches/kendall-score/yat/utility/ranking/Iterator.h

    r4064 r4065  
    2323*/
    2424
     25// This is a private file used by yat/utility/Ranking.h
     26
    2527#include "NodeBase.h"
    2628#include "NodeValue.h"
     
    3537namespace yat {
    3638namespace utility {
     39
     40  /// \cond IGNORE_DOXYGEN
    3741
    3842  // namespace for internal classes used in class Ranking
     
    155159  } // end of namespace ranking
    156160
     161  /// \endcond
     162
    157163}}} // of namespace utility, yat, and theplu
    158164#endif
  • branches/kendall-score/yat/utility/ranking/NodeBase.h

    r4064 r4065  
    2323*/
    2424
     25// This is a private file used by yat/utility/Ranking.h
     26
    2527namespace theplu {
    2628namespace yat {
    2729namespace utility {
     30
     31  /// \cond IGNORE_DOXYGEN
    2832
    2933  // namespace for internal classes used in class Ranking
     
    5256  } // end of namespace ranking
    5357
     58  /// \endcond
     59
    5460}}} // of namespace utility, yat, and theplu
    5561#endif
  • branches/kendall-score/yat/utility/ranking/NodeValue.h

    r4064 r4065  
    2323*/
    2424
     25// This is a private file used by yat/utility/Ranking.h
     26
    2527#include "NodeBase.h"
    2628
     
    3032namespace yat {
    3133namespace utility {
     34
     35  /// \cond IGNORE_DOXYGEN
    3236
    3337  // namespace for internal classes used in class Ranking
     
    5357  } // end of namespace ranking
    5458
     59  /// \endcond
     60
    5561}}} // of namespace utility, yat, and theplu
    5662#endif
Note: See TracChangeset for help on using the changeset viewer.