Stan Math Library  2.10.0
reverse mode automatic differentiation
Public Member Functions | Protected Attributes | List of all members
stan::math::welford_var_estimator Class Reference

#include <welford_var_estimator.hpp>

Public Member Functions

 welford_var_estimator (int n)
 
void restart ()
 
void add_sample (const Eigen::VectorXd &q)
 
int num_samples ()
 
void sample_mean (Eigen::VectorXd &mean)
 
void sample_variance (Eigen::VectorXd &var)
 

Protected Attributes

double _num_samples
 
Eigen::VectorXd _m
 
Eigen::VectorXd _m2
 

Detailed Description

Definition at line 11 of file welford_var_estimator.hpp.

Constructor & Destructor Documentation

stan::math::welford_var_estimator::welford_var_estimator ( int  n)
inlineexplicit

Definition at line 13 of file welford_var_estimator.hpp.

Member Function Documentation

void stan::math::welford_var_estimator::add_sample ( const Eigen::VectorXd &  q)
inline

Definition at line 25 of file welford_var_estimator.hpp.

int stan::math::welford_var_estimator::num_samples ( )
inline

Definition at line 33 of file welford_var_estimator.hpp.

void stan::math::welford_var_estimator::restart ( )
inline

Definition at line 19 of file welford_var_estimator.hpp.

void stan::math::welford_var_estimator::sample_mean ( Eigen::VectorXd &  mean)
inline

Definition at line 35 of file welford_var_estimator.hpp.

void stan::math::welford_var_estimator::sample_variance ( Eigen::VectorXd &  var)
inline

Definition at line 37 of file welford_var_estimator.hpp.

Member Data Documentation

Eigen::VectorXd stan::math::welford_var_estimator::_m
protected

Definition at line 45 of file welford_var_estimator.hpp.

Eigen::VectorXd stan::math::welford_var_estimator::_m2
protected

Definition at line 46 of file welford_var_estimator.hpp.

double stan::math::welford_var_estimator::_num_samples
protected

Definition at line 43 of file welford_var_estimator.hpp.


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

     [ Stan Home Page ] © 2011–2016, Stan Development Team.