Carna Version 3.3.3
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Carna::base::math::Statistics< T > Struct Template Reference

Holds mean and variance of an characteristic. More...

#include <math.h>

Public Member Functions

 Statistics (T mean, T variance)
 Initializes with mean and variance.
 
 Statistics (std::size_t size, const std::function< T(std::size_t) > values)
 Computes statistics from size samples queried from values.
 
Statistics< T > & operator= (const Statistics< T > &other)
 Copies from other.
 
standardDeviation () const
 Computes the standard deviation.
 

Public Attributes

mean
 Holds the mean.
 
variance
 Holds the variance.
 

Detailed Description

template<typename T>
struct Carna::base::math::Statistics< T >

Holds mean and variance of an characteristic.

Definition at line 655 of file math.h.

Constructor & Destructor Documentation

◆ Statistics() [1/2]

template<typename T >
Carna::base::math::Statistics< T >::Statistics ( mean,
variance 
)
inline

Initializes with mean and variance.

Definition at line 663 of file math.h.

◆ Statistics() [2/2]

template<typename T >
Carna::base::math::Statistics< T >::Statistics ( std::size_t  size,
const std::function< T(std::size_t) >  values 
)
inline

Computes statistics from size samples queried from values.

Definition at line 670 of file math.h.

Member Function Documentation

◆ operator=()

template<typename T >
Statistics< T > & Carna::base::math::Statistics< T >::operator= ( const Statistics< T > &  other)
inline

Copies from other.

Definition at line 701 of file math.h.

◆ standardDeviation()

template<typename T >
T Carna::base::math::Statistics< T >::standardDeviation ( ) const
inline

Computes the standard deviation.

Definition at line 711 of file math.h.

Member Data Documentation

◆ mean

template<typename T >
T Carna::base::math::Statistics< T >::mean

Holds the mean.

Definition at line 657 of file math.h.

◆ variance

template<typename T >
T Carna::base::math::Statistics< T >::variance

Holds the variance.

Definition at line 658 of file math.h.


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