Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag > Struct Template Reference

Covariance Estimator. More...

#include <statistics_fwd.hpp>

Inheritance diagram for boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag >:
Collaboration diagram for boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag >:

Public Types

typedef
numeric::functional::fdiv
< Sample, std::size_t >
::result_type 
sample_type
 
typedef
numeric::functional::fdiv
< VariateType, std::size_t >
::result_type 
variate_type
 
typedef
numeric::functional::outer_product
< sample_type, variate_type >
::result_type 
result_type
 
typedef mpl::false_ is_droppable
 

Public Member Functions

template<typename Args >
 covariance_impl (Args const &args)
 
template<typename Args >
void operator() (Args const &args)
 
result_type result (dont_care) const
 
detail::void_ operator() (dont_care)
 
detail::void_ add_ref (dont_care)
 
detail::void_ drop (dont_care)
 
detail::void_ on_drop (dont_care)
 

Detailed Description

template<typename Sample, typename VariateType, typename VariateTag>
struct boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag >

Covariance Estimator.

An iterative Monte Carlo estimator for the covariance $\mathrm{Cov}(X,X')$, where $X$ is a sample and $X'$ is a variate, is given by:

\[ \hat{c}_n = \frac{n-1}{n} \hat{c}_{n-1} + \frac{1}{n-1}(X_n - \hat{\mu}_n)(X_n' - \hat{\mu}_n'),\quad n\ge2,\quad\hat{c}_1 = 0, \]

$\hat{\mu}_n$ and $\hat{\mu}_n'$ being the means of the samples and variates.

Member Typedef Documentation

template<typename Sample , typename VariateType , typename VariateTag >
typedef numeric::functional::outer_product<sample_type, variate_type>::result_type boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag >::result_type
template<typename Sample , typename VariateType , typename VariateTag >
typedef numeric::functional::fdiv<Sample, std::size_t>::result_type boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag >::sample_type
template<typename Sample , typename VariateType , typename VariateTag >
typedef numeric::functional::fdiv<VariateType, std::size_t>::result_type boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag >::variate_type

Constructor & Destructor Documentation

template<typename Sample , typename VariateType , typename VariateTag >
template<typename Args >
boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag >::covariance_impl ( Args const &  args)
inline

Member Function Documentation

detail::void_ boost::accumulators::accumulator_base::add_ref ( dont_care  )
inlineinherited
detail::void_ boost::accumulators::accumulator_base::drop ( dont_care  )
inlineinherited
detail::void_ boost::accumulators::accumulator_base::on_drop ( dont_care  )
inlineinherited
detail::void_ boost::accumulators::accumulator_base::operator() ( dont_care  )
inlineinherited
template<typename Sample , typename VariateType , typename VariateTag >
template<typename Args >
void boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag >::operator() ( Args const &  args)
inline
template<typename Sample , typename VariateType , typename VariateTag >
result_type boost::accumulators::impl::covariance_impl< Sample, VariateType, VariateTag >::result ( dont_care  ) const
inline

The documentation for this struct was generated from the following file: