MEPP2 Project
Classes | Functions
FEVV::Math::Vector::Stats Namespace Reference

Classes

struct  IndexCmp
 

Functions

template<class ElementType >
static std::vector< ElementType > unique (const std::vector< ElementType > &v)
 
template<typename ElementType , int DIM>
static ElementType maximum (const ElementType v[DIM])
 
template<typename ElementType >
static ElementType maximum (const std::vector< ElementType > &v)
 
template<typename ElementType , int DIM>
static ElementType minimum (const ElementType v[DIM])
 
template<typename ElementType >
static ElementType minimum (const std::vector< ElementType > &v)
 
template<typename ElementType , int DIM>
static ElementType mean (const ElementType v[DIM])
 
template<typename ElementType >
static ElementType mean (const std::vector< ElementType > &v)
 
template<typename ElementType >
static ElementType mean2 (const std::vector< ElementType > &v)
 
template<typename ElementType >
static ElementType mean4 (const std::vector< ElementType > &v)
 
template<typename ElementType >
static ElementType mean_sqrt (const std::vector< ElementType > &v)
 Be careful, this function will not work if any of the values is negative. More...
 
template<typename ElementType >
static ElementType mean_sqrt_sqrt (const std::vector< ElementType > &v)
 Be careful, this function will not work if any of the values is negative. More...
 
template<typename ElementType , int DIM>
static ElementType weighted_mean (const ElementType v[DIM], const ElementType weights[DIM])
 
template<typename ElementType >
static ElementType weighted_mean (const std::vector< ElementType > &v, const std::vector< ElementType > &weights)
 
template<class ElementType >
static ElementType median (std::vector< ElementType > v)
 
template<class ElementType >
static ElementType percentile (std::vector< ElementType > v, float k)
 
template<class T >
std::vector< unsigned int > sort_vector_indices (std::vector< T > &v)
 
template<class ElementType >
static ElementType weightedmedian (const std::vector< ElementType > &v, const std::vector< ElementType > &weights)
 
template<class ElementType >
static ElementType variance (const std::vector< ElementType > &v, ElementType mean_value, bool unbiased=true)
 
template<class ElementType >
ElementType skewness (const std::vector< ElementType > &v, ElementType mean_value, ElementType biased_variance_value)
 
template<class ElementType >
ElementType kurtosis (const std::vector< ElementType > &v, ElementType mean_value, ElementType biased_variance_value)
 

Function Documentation

◆ kurtosis()

template<class ElementType >
ElementType FEVV::Math::Vector::Stats::kurtosis ( const std::vector< ElementType > &  v,
ElementType  mean_value,
ElementType  biased_variance_value 
)
inline

Definition at line 401 of file MatrixOperations.hpp.

◆ maximum() [1/2]

template<typename ElementType , int DIM>
static ElementType FEVV::Math::Vector::Stats::maximum ( const ElementType  v[DIM])
static

Definition at line 73 of file MatrixOperations.hpp.

Here is the caller graph for this function:

◆ maximum() [2/2]

template<typename ElementType >
static ElementType FEVV::Math::Vector::Stats::maximum ( const std::vector< ElementType > &  v)
static

Definition at line 87 of file MatrixOperations.hpp.

◆ mean() [1/2]

template<typename ElementType , int DIM>
static ElementType FEVV::Math::Vector::Stats::mean ( const ElementType  v[DIM])
static

Definition at line 133 of file MatrixOperations.hpp.

Here is the caller graph for this function:

◆ mean() [2/2]

template<typename ElementType >
static ElementType FEVV::Math::Vector::Stats::mean ( const std::vector< ElementType > &  v)
static

Definition at line 147 of file MatrixOperations.hpp.

◆ mean2()

template<typename ElementType >
static ElementType FEVV::Math::Vector::Stats::mean2 ( const std::vector< ElementType > &  v)
static

Definition at line 163 of file MatrixOperations.hpp.

◆ mean4()

template<typename ElementType >
static ElementType FEVV::Math::Vector::Stats::mean4 ( const std::vector< ElementType > &  v)
static

Definition at line 179 of file MatrixOperations.hpp.

◆ mean_sqrt()

template<typename ElementType >
static ElementType FEVV::Math::Vector::Stats::mean_sqrt ( const std::vector< ElementType > &  v)
static

Be careful, this function will not work if any of the values is negative.

Definition at line 195 of file MatrixOperations.hpp.

◆ mean_sqrt_sqrt()

template<typename ElementType >
static ElementType FEVV::Math::Vector::Stats::mean_sqrt_sqrt ( const std::vector< ElementType > &  v)
static

Be careful, this function will not work if any of the values is negative.

Definition at line 211 of file MatrixOperations.hpp.

◆ median()

template<class ElementType >
static ElementType FEVV::Math::Vector::Stats::median ( std::vector< ElementType >  v)
static

Compute the median: for the time being, very costly method because we use a sorting algorithm (and thus we need to get a copy of the original vector... If more efficient computation is needed, please update that piece of code by using the quickselect algorithm

Definition at line 266 of file MatrixOperations.hpp.

Here is the caller graph for this function:

◆ minimum() [1/2]

template<typename ElementType , int DIM>
static ElementType FEVV::Math::Vector::Stats::minimum ( const ElementType  v[DIM])
static

Definition at line 103 of file MatrixOperations.hpp.

Here is the caller graph for this function:

◆ minimum() [2/2]

template<typename ElementType >
static ElementType FEVV::Math::Vector::Stats::minimum ( const std::vector< ElementType > &  v)
static

Definition at line 117 of file MatrixOperations.hpp.

◆ percentile()

template<class ElementType >
static ElementType FEVV::Math::Vector::Stats::percentile ( std::vector< ElementType >  v,
float  k 
)
static

Definition at line 283 of file MatrixOperations.hpp.

◆ skewness()

template<class ElementType >
ElementType FEVV::Math::Vector::Stats::skewness ( const std::vector< ElementType > &  v,
ElementType  mean_value,
ElementType  biased_variance_value 
)
inline

Definition at line 382 of file MatrixOperations.hpp.

◆ sort_vector_indices()

template<class T >
std::vector< unsigned int > FEVV::Math::Vector::Stats::sort_vector_indices ( std::vector< T > &  v)
inline

Definition at line 321 of file MatrixOperations.hpp.

Here is the caller graph for this function:

◆ unique()

template<class ElementType >
static std::vector< ElementType > FEVV::Math::Vector::Stats::unique ( const std::vector< ElementType > &  v)
static

Definition at line 43 of file MatrixOperations.hpp.

Here is the call graph for this function:

◆ variance()

template<class ElementType >
static ElementType FEVV::Math::Vector::Stats::variance ( const std::vector< ElementType > &  v,
ElementType  mean_value,
bool  unbiased = true 
)
static

Definition at line 354 of file MatrixOperations.hpp.

Here is the caller graph for this function:

◆ weighted_mean() [1/2]

template<typename ElementType , int DIM>
static ElementType FEVV::Math::Vector::Stats::weighted_mean ( const ElementType  v[DIM],
const ElementType  weights[DIM] 
)
static

Definition at line 227 of file MatrixOperations.hpp.

Here is the call graph for this function:

◆ weighted_mean() [2/2]

template<typename ElementType >
static ElementType FEVV::Math::Vector::Stats::weighted_mean ( const std::vector< ElementType > &  v,
const std::vector< ElementType > &  weights 
)
static

Definition at line 243 of file MatrixOperations.hpp.

Here is the call graph for this function:

◆ weightedmedian()

template<class ElementType >
static ElementType FEVV::Math::Vector::Stats::weightedmedian ( const std::vector< ElementType > &  v,
const std::vector< ElementType > &  weights 
)
static

Definition at line 333 of file MatrixOperations.hpp.

Here is the call graph for this function: