| OpenMS 2.5.0

Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AsymmetricStatistics< RealT > Class Template Reference

Internal class for asymmetric distributions. More...

`#include <OpenMS/MATH/STATISTICS/AsymmetricStatistics.h>`

Inheritance diagram for AsymmetricStatistics< RealT >:

## Public Member Functions

| AsymmetricStatistics ()
| Default constructor. More...
RealType | variance1 () const
| "variance to the left hand side" More...
RealType | variance2 () const
| "variance to the right hand side" More...
template<typename ProbabilityIterator , typename CoordinateIterator >
void | update (ProbabilityIterator const probability_begin, ProbabilityIterator const probability_end, CoordinateIterator const coordinate_begin)
| You can call this as often as you like, using different input vectors. More...
Public Member Functions inherited from BasicStatistics< RealT >
| BasicStatistics ()
| Default constructor. More...
| BasicStatistics (BasicStatistics const &arg)
| Copy constructor. More...
BasicStatistics & | operator= (BasicStatistics const &arg)
| Assignment. More...
void | clear ()
| Set sum, mean, and variance to zero. More...
template<typename ProbabilityIterator >
void | update (ProbabilityIterator probability_begin, ProbabilityIterator const probability_end)
| This does the actual calculation. More...
template<typename ProbabilityIterator , typename CoordinateIterator >
void | update (ProbabilityIterator const probability_begin, ProbabilityIterator const probability_end, CoordinateIterator const coordinate_begin)
| This does the actual calculation. More...
RealType | mean () const
| Returns the mean. More...
void | setMean (RealType const &mean)
RealType | variance () const
| Returns the variance. More...
void | setVariance (RealType const &variance)
RealType | sum () const
| Returns the sum. More...
void | setSum (RealType const &sum)
RealType | normalDensity_sqrt2pi (RealType coordinate) const
| Returns the density of the normal approximation at point, multiplied by sqrt( 2 * pi ). This saves a division operation compared to normalDensity() More...
RealType | normalDensity (RealType const coordinate) const
| See normalDensity_sqrt2pi(). Returns the density of the normal distribution at point. More...
void | normalApproximation (probability_container &probability)
| The argument `probability` is filled with values according to the normal approximation. Its `size()` is not changed. The approximation takes place at coordinate positions 0, 1, ..., size()-1. More...
void | normalApproximation (probability_container &probability, typename probability_container::size_type const size)
void | normalApproximation (probability_container &probability, coordinate_container const &coordinate)
| The argument probability is filled with values according to the normal approximation. The second argument coordinate contains the positions where the approximation takes place. probability.size() is set to coordinate.size(). More...

## Protected Attributes

Protected Members
RealType | variance1_
RealType | variance2_
Protected Attributes inherited from BasicStatistics< RealT >
RealType | mean_
RealType | variance_
RealType | sum_

## Private Types

typedef BasicStatistics< RealT > | Base
| The real type and basic statistics specified as template argument. More...
typedef Base::RealType | RealType

## Private Member Functions

void | clear ()
| Set sum, mean, and variance to zero. More...

## Private Attributes

RealType | sum_
RealType | mean_
RealType | variance_

## Additional Inherited Members

Public Types inherited from BasicStatistics< RealT >
typedef RealT | RealType
| The real type specified as template argument. More...
typedef std::vector< RealType > | probability_container
typedef std::vector< RealType > | coordinate_container
Static Public Member Functions inherited from BasicStatistics< RealT >
static RealType | sqrt2pi ()
| Returns sqrt( 2 * pi ), which is useful to normalize the result of normalDensity_sqrt2pi(). More...

## Detailed Description

### template<typename RealT = double>
class OpenMS::Math::AsymmetricStatistics< RealT >

Internal class for asymmetric distributions.

Internal class for asymmetric distributions used for consistency with BasisStatistic class

## Member Typedef Documentation

## ◆ Base

typedef BasicStatistics<RealT> Base

private

The real type and basic statistics specified as template argument.

## ◆ RealType

typedef Base::RealType RealType

private

## Constructor & Destructor Documentation

## ◆ AsymmetricStatistics()

AsymmetricStatistics | ( |  | ) |

inline

Default constructor.

## Member Function Documentation

## ◆ clear()

void clear

inline private

Set sum, mean, and variance to zero.

## ◆ update()

void update | ( | ProbabilityIterator const | probability_begin,
|  | ProbabilityIterator const | probability_end,
|  | CoordinateIterator const | coordinate_begin
| ) |  |

inline

You can call this as often as you like, using different input vectors.

References BasicStatistics< RealT >::mean_, BasicStatistics< RealT >::update(), AsymmetricStatistics< RealT >::variance1_, AsymmetricStatistics< RealT >::variance2_, and BasicStatistics< RealT >::variance_.

## ◆ variance1()

RealType variance1 | ( |  | ) | const

inline

"variance to the left hand side"

References AsymmetricStatistics< RealT >::variance1_.

## ◆ variance2()

RealType variance2 | ( |  | ) | const

inline

"variance to the right hand side"

References AsymmetricStatistics< RealT >::variance2_.

## Member Data Documentation

## ◆ mean_

RealType mean_

private

## ◆ sum_

RealType sum_

private

## ◆ variance1_

RealType variance1_

protected

Referenced by AsymmetricStatistics< RealT >::update(), and AsymmetricStatistics< RealT >::variance1().

## ◆ variance2_

RealType variance2_

protected

Referenced by AsymmetricStatistics< RealT >::update(), and AsymmetricStatistics< RealT >::variance2().

## ◆ variance_

RealType variance_

private