Ignore:
Timestamp:
Aug 8, 2008, 12:47:18 AM (13 years ago)
Author:
Peter
Message:

refs #366 - weighted percentile
Added a class Percentile that can calculate the percentile for both
unweighted and weighted ranges. In order to make sense of the weighted
case, I had to modify the definition of percentile (slightly). The old
function percentile is using the old definition, but a new function,
percentile2, is using the new function and is simply calling the
Percentile class. The median is the same for the two definitions and
therefore it makes no difference which function to call, but to enable
calculation of weighted median percentile2 is called.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/WeightIterator.h

    r1377 r1404  
    4040    WeightIterator<Base>               // Derived
    4141    , Base                          // Base
    42     , boost::remove_reference<typename iterator_traits<Base>::weight_reference>
     42    , typename boost::remove_reference<typename iterator_traits<Base>::weight_reference>::type
    4343    , boost::forward_traversal_tag    // CategoryOrTraversal
    4444    , typename iterator_traits<Base>::weight_reference // Reference
     
    8383   */
    8484  template<typename Base>
    85   WeightIterator<Base> make_weight_iterator(Base base)
     85  WeightIterator<Base> weight_iterator(Base base)
    8686  {
    8787    return WeightIterator<Base>(base);
Note: See TracChangeset for help on using the changeset viewer.