ALPSCore reference
|
#include <variance.hpp>
Public Types | |
using | value_type = T |
using | var_type = typename bind< Strategy, T >::var_type |
Public Member Functions | |
var_acc (size_t size=1, size_t batch_size=1) | |
var_acc (const var_acc &other) | |
var_acc & | operator= (const var_acc &other) |
void | reset () |
void | set_size (size_t size) |
void | set_batch_size (size_t batch_size) |
bool | valid () const |
size_t | size () const |
size_t | batch_size () const |
var_acc & | operator<< (const computed< T > &src) |
var_acc & | operator<< (const var_result< T, Strategy > &result) |
size_t | count () const |
var_result< T, Strategy > | result () const |
var_result< T, Strategy > | finalize () |
const bundle< value_type > & | current () const |
const var_data< T, Strategy > & | store () const |
Protected Member Functions | |
void | add (const computed< T > &source, size_t count, var_acc *cascade) |
void | add_bundle (var_acc *cascade) |
void | finalize_to (var_result< T, Strategy > &result, var_acc *cascade) |
Friends | |
class | autocorr_acc< T > |
class | batch_result< T > |
Accumulator which tracks the mean and a naive variance estimate.
Definition at line 21 of file variance.hpp.
using alps::alea::var_acc< T, Strategy >::value_type = T |
Definition at line 122 of file variance.hpp.
using alps::alea::var_acc< T, Strategy >::var_type = typename bind<Strategy, T>::var_type |
Definition at line 123 of file variance.hpp.
alps::alea::var_acc< T, Str >::var_acc | ( | size_t | size = 1 , |
size_t | batch_size = 1 |
||
) |
Definition at line 77 of file variance.cpp.
alps::alea::var_acc< T, Str >::var_acc | ( | const var_acc< T, Strategy > & | other | ) |
Definition at line 84 of file variance.cpp.
|
protected |
Definition at line 124 of file variance.cpp.
|
protected |
Definition at line 190 of file variance.cpp.
|
inline |
Returns number of data points per batch
Definition at line 148 of file variance.hpp.
|
inline |
Returns sample size, i.e., number of accumulated data points
Definition at line 157 of file variance.hpp.
|
inline |
Definition at line 165 of file variance.hpp.
var_result< T, Str > alps::alea::var_acc< T, Str >::finalize | ( | ) |
Frees data associated with accumulator and return result
Definition at line 164 of file variance.cpp.
|
protected |
Definition at line 172 of file variance.cpp.
|
inline |
Add computed vector to the accumulator
Definition at line 151 of file variance.hpp.
var_acc& alps::alea::var_acc< T, Strategy >::operator<< | ( | const var_result< T, Strategy > & | result | ) |
Merge partial result into accumulator
var_acc< T, Str > & alps::alea::var_acc< T, Str >::operator= | ( | const var_acc< T, Strategy > & | other | ) |
Definition at line 90 of file variance.cpp.
void alps::alea::var_acc< T, Str >::reset | ( | ) |
Re-allocate and thus clear all accumulated data
Definition at line 98 of file variance.cpp.
var_result< T, Str > alps::alea::var_acc< T, Str >::result | ( | ) | const |
Returns result corresponding to current state of accumulator
Definition at line 155 of file variance.cpp.
void alps::alea::var_acc< T, Str >::set_batch_size | ( | size_t | batch_size | ) |
Update the batch size and discard current batch
Definition at line 116 of file variance.cpp.
void alps::alea::var_acc< T, Str >::set_size | ( | size_t | size | ) |
Update the size and discard all measurements, if any
Definition at line 108 of file variance.cpp.
|
inline |
Number of components of the random vector (e.g., size of mean)
Definition at line 145 of file variance.hpp.
|
inline |
Return backend object used for storing estimands
Definition at line 168 of file variance.hpp.
|
inline |
Returns false
if finalize()
has been called, true
otherwise
Definition at line 142 of file variance.hpp.
|
friend |
Definition at line 181 of file variance.hpp.
|
friend |
Definition at line 182 of file variance.hpp.