ALPSCore reference
Public Types | Public Member Functions | Protected Member Functions | List of all members
alps::alea::mean_acc< T > Class Template Reference

#include <mean.hpp>

Collaboration diagram for alps::alea::mean_acc< T >:
Collaboration graph

Public Types

using value_type = T
 

Public Member Functions

 mean_acc (size_t size=1)
 
 mean_acc (const mean_acc &other)
 
mean_accoperator= (const mean_acc &other)
 
void reset ()
 
void set_size (size_t size)
 
bool valid () const
 
size_t size () const
 
mean_accoperator<< (const computed< T > &src)
 
mean_accoperator<< (const mean_result< T > &result)
 
size_t count () const
 
mean_result< T > result () const
 
mean_result< T > finalize ()
 
const mean_data< T > & store () const
 

Protected Member Functions

void add (const computed< T > &source, size_t count)
 
void finalize_to (mean_result< T > &result)
 

Detailed Description

template<typename T>
class alps::alea::mean_acc< T >

Accumulator which tracks only the mean.

Definition at line 18 of file mean.hpp.

Member Typedef Documentation

template<typename T >
using alps::alea::mean_acc< T >::value_type = T

Definition at line 100 of file mean.hpp.

Constructor & Destructor Documentation

template<typename T >
alps::alea::mean_acc< T >::mean_acc ( size_t  size = 1)
inline

Definition at line 103 of file mean.hpp.

template<typename T >
alps::alea::mean_acc< T >::mean_acc ( const mean_acc< T > &  other)

Definition at line 47 of file mean.cpp.

Member Function Documentation

template<typename T >
void alps::alea::mean_acc< T >::add ( const computed< T > &  source,
size_t  count 
)
protected

Definition at line 61 of file mean.cpp.

template<typename T >
size_t alps::alea::mean_acc< T >::count ( ) const
inline

Returns sample size, i.e., number of accumulated data points

Definition at line 128 of file mean.hpp.

template<typename T >
mean_result< T > alps::alea::mean_acc< T >::finalize ( )

Frees data associated with accumulator and return result

Definition at line 111 of file mean.cpp.

template<typename T >
void alps::alea::mean_acc< T >::finalize_to ( mean_result< T > &  result)
protected

Definition at line 119 of file mean.cpp.

template<typename T >
mean_acc& alps::alea::mean_acc< T >::operator<< ( const computed< T > &  src)
inline

Add computed vector to the accumulator

Definition at line 122 of file mean.hpp.

template<typename T >
mean_acc< T > & alps::alea::mean_acc< T >::operator<< ( const mean_result< T > &  result)

Merge partial result into accumulator

Definition at line 69 of file mean.cpp.

template<typename T >
mean_acc< T > & alps::alea::mean_acc< T >::operator= ( const mean_acc< T > &  other)

Definition at line 53 of file mean.cpp.

template<typename T >
void alps::alea::mean_acc< T >::reset ( )

Re-allocate and thus clear all accumulated data

Definition at line 85 of file mean.cpp.

template<typename T >
mean_result< T > alps::alea::mean_acc< T >::result ( ) const

Returns result corresponding to current state of accumulator

Definition at line 102 of file mean.cpp.

template<typename T >
void alps::alea::mean_acc< T >::set_size ( size_t  size)

Update the size and discard all measurements, if any

Definition at line 94 of file mean.cpp.

template<typename T >
size_t alps::alea::mean_acc< T >::size ( ) const
inline

Number of components of the random vector (e.g., size of mean)

Definition at line 119 of file mean.hpp.

template<typename T >
const mean_data<T>& alps::alea::mean_acc< T >::store ( ) const
inline

Return backend object used for storing estimands

Definition at line 137 of file mean.hpp.

template<typename T >
bool alps::alea::mean_acc< T >::valid ( ) const
inline

Returns false if finalize() has been called, true otherwise

Definition at line 116 of file mean.hpp.


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