31 template <
typename RealT =
double>
66 template <
typename ProbabilityIterator,
typename CoordinateIterator>
67 void update(ProbabilityIterator
const probability_begin,
68 ProbabilityIterator
const probability_end,
69 CoordinateIterator
const coordinate_begin)
72 Base::update(probability_begin, probability_end, coordinate_begin);
80 ProbabilityIterator prob_iter = probability_begin;
81 CoordinateIterator coord_iter = coordinate_begin;
82 for (; prob_iter != probability_end; ++prob_iter, ++coord_iter)
89 if (*coord_iter <
mean_)
102 RealType frac = (diff / stdev + 1.) / 2.;
103 RealType prob_frac = frac * *prob_iter;
106 prob_frac = *prob_iter * (1. - frac);
Internal class for asymmetric distributions.
Definition: AsymmetricStatistics.h:34
RealType variance1_
Definition: AsymmetricStatistics.h:118
RealType variance2_
Definition: AsymmetricStatistics.h:118
RealType variance1() const
"variance to the left hand side"
Definition: AsymmetricStatistics.h:54
RealType variance2() const
"variance to the right hand side"
Definition: AsymmetricStatistics.h:60
AsymmetricStatistics()
Default constructor.
Definition: AsymmetricStatistics.h:47
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.
Definition: AsymmetricStatistics.h:67
RealType variance_
Definition: BasicStatistics.h:237
Base::RealType RealType
Definition: AsymmetricStatistics.h:37
BasicStatistics< RealT > Base
The real type and basic statistics specified as template argument.
Definition: AsymmetricStatistics.h:36
RealType mean_
Definition: BasicStatistics.h:236
Calculates some basic statistical parameters of a distribution: sum, mean, variance,...
Definition: BasicStatistics.h:43
RealT RealType
The real type specified as template argument.
Definition: BasicStatistics.h:48
void update(ProbabilityIterator probability_begin, ProbabilityIterator const probability_end)
This does the actual calculation.
Definition: BasicStatistics.h:87
RealType sum_
Definition: BasicStatistics.h:238
void clear()
Set sum, mean, and variance to zero.
Definition: BasicStatistics.h:77
RealType variance_
Definition: BasicStatistics.h:237
RealType mean_
Definition: BasicStatistics.h:236
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22