CFEL - ASG Software Suite  2.5.0
CASS
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
cass::CummulativeStatisticsNoOutlier< Type > Class Template Reference

statistics calculator for a cummulative statistic, removes outliers More...

#include <statistics_calculator.hpp>

+ Collaboration diagram for cass::CummulativeStatisticsNoOutlier< Type >:

Public Types

typedef Type value_type
 define the value type More...
 
typedef CummulativeStatisticsCalculator< value_typestatistics_t
 define the statistics More...
 
typedef std::vector< value_typecontainer_type
 define the type of container used for the values More...
 
typedef container_type::iterator iterator_t
 define a const iterator of the container More...
 
typedef std::iterator_traits< iterator_t >::difference_type count_type
 define number of elements More...
 

Public Member Functions

 CummulativeStatisticsNoOutlier (const value_type &snr)
 constructor sets the signal to noise ratio More...
 
void addDatum (const value_type &datum)
 add a datum to the container More...
 
template<class InputIterator >
void addDistribution (InputIterator first, InputIterator last)
 add a number of dati to the distribution More...
 
void setDistribution (const container_type &distribution)
 substitute the internal container with an outside one More...
 
value_type mean ()
 retrieve the mean of the distribution without outliers More...
 
value_type stdv ()
 retrieve the standart deviation of the distribution More...
 
count_type nbrPointsUsed ()
 retrieve the number of points used in the statistics More...
 
count_type nbrUpperOutliers ()
 retrieve the number of outliers higher than the distribution used More...
 
count_type nbrLowerOutliers ()
 retrieve the number of outliers lower than the distribution used More...
 
count_type nbrOutliers ()
 retrieve the total number of outliers More...
 
void reset ()
 reset the container More...
 

Private Member Functions

void updateStat ()
 update the statistic values More...
 

Private Attributes

statistics_t _stat
 the statistics calculator More...
 
container_type _container
 container to store the values in More...
 
Type _mean
 the mean without outliers More...
 
Type _stdv
 the stdv without outliers More...
 
count_type _nPoints
 the number of points included in the statistics calculation More...
 
count_type _nUpperOutliers
 the number of upper outliers More...
 
count_type _nLowerOutliers
 the number of lower outliers More...
 
bool _containerChanged
 flag to show whether the statistic values have to be updated More...
 
Type _snr
 the signal to noise ratio that will detectect outliers More...
 

Detailed Description

template<typename Type>
class cass::CummulativeStatisticsNoOutlier< Type >

statistics calculator for a cummulative statistic, removes outliers

class uses the CummulativeStatisticsCalculator to calculate the mean and stdv, but removes the outliers from the statistics.

Template Parameters
typeof the values for the average, defines the precision
Author
Lutz Foucar

Definition at line 157 of file statistics_calculator.hpp.

Member Typedef Documentation

template<typename Type>
typedef std::vector<value_type> cass::CummulativeStatisticsNoOutlier< Type >::container_type

define the type of container used for the values

Definition at line 167 of file statistics_calculator.hpp.

template<typename Type>
typedef std::iterator_traits<iterator_t>::difference_type cass::CummulativeStatisticsNoOutlier< Type >::count_type

define number of elements

Definition at line 173 of file statistics_calculator.hpp.

template<typename Type>
typedef container_type::iterator cass::CummulativeStatisticsNoOutlier< Type >::iterator_t

define a const iterator of the container

Definition at line 170 of file statistics_calculator.hpp.

define the statistics

Definition at line 164 of file statistics_calculator.hpp.

template<typename Type>
typedef Type cass::CummulativeStatisticsNoOutlier< Type >::value_type

define the value type

Definition at line 161 of file statistics_calculator.hpp.

Constructor & Destructor Documentation

template<typename Type>
cass::CummulativeStatisticsNoOutlier< Type >::CummulativeStatisticsNoOutlier ( const value_type snr)
inline

constructor sets the signal to noise ratio

Parameters
snrthe signal to noise ratio to detect outliers

Definition at line 179 of file statistics_calculator.hpp.

Member Function Documentation

template<typename Type>
void cass::CummulativeStatisticsNoOutlier< Type >::addDatum ( const value_type datum)
inline
template<typename Type>
template<class InputIterator >
void cass::CummulativeStatisticsNoOutlier< Type >::addDistribution ( InputIterator  first,
InputIterator  last 
)
inline

add a number of dati to the distribution

Adds all elements between first and last to the distribution, but not the last

Parameters
firstThe first in the range to be added
lastThe element after last to be added

Definition at line 202 of file statistics_calculator.hpp.

References cass::CummulativeStatisticsNoOutlier< Type >::addDatum().

Referenced by cass::pp333::meanCalc(), and cass::pp330::setBadPixMap().

template<typename Type>
value_type cass::CummulativeStatisticsNoOutlier< Type >::mean ( )
inline
template<typename Type>
count_type cass::CummulativeStatisticsNoOutlier< Type >::nbrLowerOutliers ( )
inline

retrieve the number of outliers lower than the distribution used

Returns
number of outliers lower than the distribution used

Definition at line 262 of file statistics_calculator.hpp.

References cass::CummulativeStatisticsNoOutlier< Type >::_nLowerOutliers, and cass::CummulativeStatisticsNoOutlier< Type >::updateStat().

Referenced by cass::CummulativeStatisticsNoOutlier< Type >::nbrOutliers().

template<typename Type>
count_type cass::CummulativeStatisticsNoOutlier< Type >::nbrOutliers ( )
inline

retrieve the total number of outliers

Returns
total number of outliers

Definition at line 272 of file statistics_calculator.hpp.

References cass::CummulativeStatisticsNoOutlier< Type >::nbrLowerOutliers(), and cass::CummulativeStatisticsNoOutlier< Type >::nbrUpperOutliers().

template<typename Type>
count_type cass::CummulativeStatisticsNoOutlier< Type >::nbrPointsUsed ( )
inline

retrieve the number of points used in the statistics

Returns
number of points used in the statistics

Definition at line 242 of file statistics_calculator.hpp.

References cass::CummulativeStatisticsNoOutlier< Type >::_nPoints, and cass::CummulativeStatisticsNoOutlier< Type >::updateStat().

Referenced by cass::pp208::isNotHighest(), and cass::pp330::process().

template<typename Type>
count_type cass::CummulativeStatisticsNoOutlier< Type >::nbrUpperOutliers ( )
inline

retrieve the number of outliers higher than the distribution used

Returns
number of outliers higher than the distribution used

Definition at line 252 of file statistics_calculator.hpp.

References cass::CummulativeStatisticsNoOutlier< Type >::_nUpperOutliers, and cass::CummulativeStatisticsNoOutlier< Type >::updateStat().

Referenced by cass::pp208::isNotHighest(), cass::CummulativeStatisticsNoOutlier< Type >::nbrOutliers(), and cass::pp208::process().

template<typename Type>
void cass::CummulativeStatisticsNoOutlier< Type >::reset ( )
inline
template<typename Type>
void cass::CummulativeStatisticsNoOutlier< Type >::setDistribution ( const container_type distribution)
inline

substitute the internal container with an outside one

Parameters
distributionThe external container

Definition at line 212 of file statistics_calculator.hpp.

References cass::CummulativeStatisticsNoOutlier< Type >::_container, cass::CummulativeStatisticsNoOutlier< Type >::_containerChanged, and distribution.

template<typename Type>
value_type cass::CummulativeStatisticsNoOutlier< Type >::stdv ( )
inline

retrieve the standart deviation of the distribution

Returns
standart deviation of the distribution

Definition at line 232 of file statistics_calculator.hpp.

References cass::CummulativeStatisticsNoOutlier< Type >::_stdv, and cass::CummulativeStatisticsNoOutlier< Type >::updateStat().

Referenced by cass::pp330::process(), cass::pp208::process(), cass::pp330::setBadPixMap(), and cass::MovingStatisticsCalculator< Type >::stdv().

template<typename Type>
void cass::CummulativeStatisticsNoOutlier< Type >::updateStat ( )
inlineprivate

Member Data Documentation

template<typename Type>
container_type cass::CummulativeStatisticsNoOutlier< Type >::_container
private
template<typename Type>
bool cass::CummulativeStatisticsNoOutlier< Type >::_containerChanged
private
template<typename Type>
Type cass::CummulativeStatisticsNoOutlier< Type >::_mean
private
template<typename Type>
count_type cass::CummulativeStatisticsNoOutlier< Type >::_nLowerOutliers
private
template<typename Type>
count_type cass::CummulativeStatisticsNoOutlier< Type >::_nPoints
private

the number of points included in the statistics calculation

Definition at line 347 of file statistics_calculator.hpp.

Referenced by cass::CummulativeStatisticsNoOutlier< Type >::nbrPointsUsed(), and cass::CummulativeStatisticsNoOutlier< Type >::updateStat().

template<typename Type>
count_type cass::CummulativeStatisticsNoOutlier< Type >::_nUpperOutliers
private
template<typename Type>
Type cass::CummulativeStatisticsNoOutlier< Type >::_snr
private

the signal to noise ratio that will detectect outliers

Definition at line 359 of file statistics_calculator.hpp.

Referenced by cass::CummulativeStatisticsNoOutlier< Type >::updateStat().

template<typename Type>
statistics_t cass::CummulativeStatisticsNoOutlier< Type >::_stat
private

the statistics calculator

Definition at line 335 of file statistics_calculator.hpp.

Referenced by cass::CummulativeStatisticsNoOutlier< Type >::updateStat().

template<typename Type>
Type cass::CummulativeStatisticsNoOutlier< Type >::_stdv
private

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