Changeset 2415


Ignore:
Timestamp:
Jan 22, 2011, 7:01:31 AM (12 years ago)
Author:
Peter
Message:

improve Centralizer docs. fixes #652

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/normalizer/Centralizer.h

    r2283 r2415  
    66/*
    77  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
    8   Copyright (C) 2009, 2010 Peter Johansson
     8  Copyright (C) 2009, 2010, 2011 Peter Johansson
    99
    1010  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    4343     \brief Centralize a range
    4444
    45      The center is calculated and then that value is subtracted from
    46      each element. By default the center is defined as the arithmetic
    47      mean, but this can be changed by providing a suitable
    48      UnaryFunction.
     45     The class centralizes a range <tt> [first, last) </tt> in two
     46     steps. First, the center value is calculaterd using the functor
     47     \c UnaryFunction to calculate the center. Second, the center
     48     value is subtracted from each element in range <tt> [first, last)
     49     </tt>. \c UnaryFunction must be a functor that has an operator:
    4950
    50      Type Requirements:
    51      - InputIterator must be an \input_iterator
    52      - ForwardIterator must be a mutable \forward_iterator
     51     \code
     52     return_type operator()(InputIterator, InputIterator) const
     53     \endcode
     54
     55     where \c return_type must be convertible to \c value_type of \c
     56     InputIterator. By default the center value is calculated as the
     57     arithmetic mean via class statistics::Average, but this can be
     58     changed using an alternative functor such as
     59     statistics::Percentiler.
    5360
    5461     \since New in yat 0.5
     
    8289       same.
    8390
     91       Type Requirements:
     92       - InputIterator must be an \input_iterator
     93       - ForwardIterator must be a mutable \forward_iterator
     94
    8495       \see std::transform
    8596     */
Note: See TracChangeset for help on using the changeset viewer.