TTK
Loading...
Searching...
No Matches
Functions
ttk::Statistics Namespace Reference

Functions

template<typename T >
mean (const T *v, const int &dimension=3)
 
template<typename T >
mean (const std::vector< T > &v)
 
template<typename T >
var (const T *v, const int &dimension=3)
 
template<typename T >
var (const std::vector< T > &v)
 
template<typename T >
cov (const T *v1, const T *v2, const int &dimension1=3, const int &dimension2=3)
 
template<typename T >
cov (const std::vector< T > &v1, const std::vector< T > &v2)
 
template<typename T >
corr (const T *v1, const T *v2, const int &dimension1=3, const int &dimension2=3)
 
template<typename T >
corr (const std::vector< T > &v1, const std::vector< T > &v2)
 

Function Documentation

◆ corr() [1/2]

template<typename T >
T ttk::Statistics::corr ( const std::vector< T > &  v1,
const std::vector< T > &  v2 
)

Compute the sample correlation of two random variables (e.g. two vectors)

Parameters
v1vector containing the values of the first variable..
v2vector containing the values of the second variable.
Returns
Returns the correlation of the vectors.

Definition at line 59 of file Statistics.cpp.

◆ corr() [2/2]

template<typename T >
T ttk::Statistics::corr ( const T *  v1,
const T *  v2,
const int &  dimension1 = 3,
const int &  dimension2 = 3 
)

Compute the sample correlation of two random variables (e.g. two vectors)

Parameters
v1vector containing the values of the first variable..
v2vector containing the values of the second variable.
dimension1Optional parameter that specifies the dimension of the first vector (by default 3).
dimension2Optional parameter that specifies the dimension of the second vector (by default 3).
Returns
Returns the correlation of the vectors.

Definition at line 50 of file Statistics.cpp.

◆ cov() [1/2]

template<typename T >
T ttk::Statistics::cov ( const std::vector< T > &  v1,
const std::vector< T > &  v2 
)

Compute the sample covariance of two random variables (e.g. two vectors)

Parameters
v1vector containing the values of the first variable..
v2vector containing the values of the second variable.
Returns
Returns the covariance of the vectors.

Definition at line 45 of file Statistics.cpp.

◆ cov() [2/2]

template<typename T >
T ttk::Statistics::cov ( const T *  v1,
const T *  v2,
const int &  dimension1 = 3,
const int &  dimension2 = 3 
)

Compute the sample covariance of two random variables (e.g. two vectors)

Parameters
v1vector containing the values of the first variable..
v2vector containing the values of the second variable.
dimension1Optional parameter that specifies the dimension of the first vector (by default 3).
dimension2Optional parameter that specifies the dimension of the second vector (by default 3).
Returns
Returns the covariance of the vectors.

Definition at line 32 of file Statistics.cpp.

◆ mean() [1/2]

template<typename T >
T ttk::Statistics::mean ( const std::vector< T > &  v)

Compute the sample mean of a random variable (e.g. a vector)

Parameters
vvector containing the values.
Returns
Returns the mean of the vector.

Definition at line 17 of file Statistics.cpp.

◆ mean() [2/2]

template<typename T >
T ttk::Statistics::mean ( const T *  v,
const int &  dimension = 3 
)

Compute the sample mean of a random variable (e.g. a vector)

Parameters
vvector containing the values.
dimensionOptional parameter that specifies the dimension of the vector (by default 3).
Returns
Returns the mean of the vector.

Definition at line 9 of file Statistics.cpp.

◆ var() [1/2]

template<typename T >
T ttk::Statistics::var ( const std::vector< T > &  v)

Compute the sample varuance of a random variable (e.g. a vector)

Parameters
vvector containing the values.
Returns
Returns the variance of the vector.

Definition at line 27 of file Statistics.cpp.

◆ var() [2/2]

template<typename T >
T ttk::Statistics::var ( const T *  v,
const int &  dimension = 3 
)

Compute the sample varuance of a random variable (e.g. a vector)

Parameters
vvector containing the values.
dimensionOptional parameter that specifies the dimension of the vector (by default 3).
Returns
Returns the variance of the vector.

Definition at line 22 of file Statistics.cpp.