Changeset 699 for trunk/yat/statistics


Ignore:
Timestamp:
Oct 26, 2006, 3:54:20 PM (15 years ago)
Author:
Peter
Message:

fixed docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/AveragerWeighted.h

    r683 r699  
    8989    ///
    9090    /// The requirements for the types T1 and T2 of the arrays \a x
    91     /// and \a w are: operator[] returning an element and function
    92     /// size() returning the number of elements.
     91    /// and \a w are: operator[] returning an element and function
     92    /// size() returning the number of elements.
    9393    ///
    9494    template <typename T1, typename T2>
     
    102102    inline double mean(void) const { return sum_w() ?
    103103                                       sum_wx()/sum_w() : 0; }
    104  
    105     ///
    106     /// @brief Weighted version of number of data points. If all
     104
     105    ///
     106    /// @brief Weighted version of number of data points.
     107    ///
     108    /// If all
    107109    /// weights are equal, the unweighted version is identical to the
    108110    /// non-weighted version. Adding a data point with zero weight
     
    174176    { return sum_wxx() - mean()*mean()*sum_w(); }
    175177
    176     ///
    177     /// The variance is calculated as \f$ \frac{\sum w_i (x_i - m)^2
    178     /// }{\sum w_i} \f$, where \a m is the known mean.
    179     ///
    180     /// @return Variance when the mean is known to be \a m.
    181     ///
     178    /**
     179      The variance is calculated as \f$ \frac{\sum w_i (x_i - m)^2
     180      }{\sum w_i} \f$, where \a m is the known mean.
     181       
     182      @return Variance when the mean is known to be \a m.
     183    */
    182184    inline double variance(const double m) const
    183185    { return (sum_wxx()-2*m*sum_wx())/sum_w()+m*m; }
    184186
    185     ///
    186     /// The variance is calculated as \f$ \frac{\sum w_i (x_i - m)^2
    187     /// }{\sum w_i} \f$, where \a m is the mean(). Here the weight are
    188     /// interpreted as probability weights. For analytical weights the
    189     /// variance has no meaning as each data point has its own
    190     /// variance.
    191     ///
    192     /// @return The variance.
    193     ///
     187    /**
     188      The variance is calculated as \f$ \frac{\sum w_i (x_i - m)^2
     189      }{\sum w_i} \f$, where \a m is the mean(). Here the weight are
     190      interpreted as probability weights. For analytical weights the
     191      variance has no meaning as each data point has its own
     192      variance.
     193       
     194      @return The variance.
     195    */
    194196    inline double variance(void) const
    195197    { return sum_xx_centered()/sum_w(); }
Note: See TracChangeset for help on using the changeset viewer.