38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
52 class MetaInfoInterface;
61 template <
typename VALUE_TYPE>
96 VALUE_TYPE
min_{std::numeric_limits<VALUE_TYPE>::max()};
97 VALUE_TYPE
max_{std::numeric_limits<VALUE_TYPE>::lowest()};
141 using StatsMap = std::map<RangeStatsType, RangeStatsVariant>;
154 return overview_range_data_;
160 return overview_count_data_;
209 const UInt number_of_bins)
const override;
226 const UInt number_of_bins)
const override;
243 const UInt number_of_bins)
const override;
A container for consensus elements.
Definition: ConsensusMap.h:90
A container for features.
Definition: FeatureMap.h:106
std::vector< PeptideIdentification > PepIds
Definition: IPeptideIds.h:49
Computes statistics and distributions for a PeakMap.
Definition: LayerStatistics.h:221
const ConsensusMap * cm_
Definition: LayerStatistics.h:230
void computeStatistics_() override
compute the range and count statistics. Call this method in the Ctor of derived classes.
Math::Histogram getDistribution(const RangeStatsType &which, const UInt number_of_bins) const override
After computing the overview statistic, you can query a concrete distribution by giving the name of t...
LayerStatisticsConsensusMap(const ConsensusMap &cm)
Computes statistics and distributions for a PeakMap.
Definition: LayerStatistics.h:204
const FeatureMap * fm_
Definition: LayerStatistics.h:213
void computeStatistics_() override
compute the range and count statistics. Call this method in the Ctor of derived classes.
LayerStatisticsFeatureMap(const FeatureMap &fm)
Math::Histogram getDistribution(const RangeStatsType &which, const UInt number_of_bins) const override
After computing the overview statistic, you can query a concrete distribution by giving the name of t...
Computes statistics and distributions for a vector<PeptideIdentifications>
Definition: LayerStatistics.h:238
void computeStatistics_() override
compute the range and count statistics. Call this method in the Ctor of derived classes.
LayerStatisticsIdent(const IPeptideIds::PepIds &cm)
Math::Histogram getDistribution(const RangeStatsType &which, const UInt number_of_bins) const override
After computing the overview statistic, you can query a concrete distribution by giving the name of t...
const IPeptideIds::PepIds * ids_
Definition: LayerStatistics.h:247
Computes statistics and distributions for a PeakMap.
Definition: LayerStatistics.h:188
void computeStatistics_() override
compute the range and count statistics. Call this method in the Ctor of derived classes.
const PeakMap * pm_
Definition: LayerStatistics.h:196
LayerStatisticsPeakMap(const PeakMap &pm)
Math::Histogram getDistribution(const RangeStatsType &which, const UInt number_of_bins) const override
After computing the overview statistic, you can query a concrete distribution by giving the name of t...
Compute summary statistics (count/min/max/avg) about a container, e.g. intensity, charge,...
Definition: LayerStatistics.h:149
void bringInMetaStats_(const MetaInfoInterface *meta_interface)
Brings the meta values of one meta_interface (a peak or feature) into the statistics.
virtual void computeStatistics_()=0
compute the range and count statistics. Call this method in the Ctor of derived classes.
StatsMap overview_range_data_
data on numerical values computed during getOverviewStatistics
Definition: LayerStatistics.h:179
const StatsCounterMap & getCountStatistics() const
obtain count statistics for all meta values which are not numerical
Definition: LayerStatistics.h:158
const StatsMap & getRangeStatistics() const
get all range statistics, any of which can then be plugged into getDistribution()
Definition: LayerStatistics.h:152
StatsCounterMap overview_count_data_
count data on non-numerical values computed during getOverviewStatistics
Definition: LayerStatistics.h:180
virtual Math::Histogram getDistribution(const RangeStatsType &which, const UInt number_of_bins=500) const =0
After computing the overview statistic, you can query a concrete distribution by giving the name of t...
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:73
Representation of a histogram.
Definition: Histogram.h:64
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
static const std::array< const char *,(size_t) RangeStatsSource::SIZE_OF_STATSSOURCE > StatsSourceNames
Names corresponding to elements of enum RangeStatsSource.
Definition: LayerStatistics.h:121
RangeStatsSource
Where did a statistic come from? Useful for display to user, and for internal dispatch when user requ...
Definition: LayerStatistics.h:113
@ METAINFO
statistic was obtained from MetaInfoInterface of container elements, e.g. "FWHM" for FeatureMaps
@ CORE
statistic was obtained from a core data structure of the container, e.g. intensity
@ ARRAYINFO
statistic was obtained from Float/IntegerArrays of the container elements, e.g. "IonMobility" for Pea...
size_t counter
Definition: LayerStatistics.h:108
std::map< std::string, StatsCounter > StatsCounterMap
collection of MetaValues which are not numeric (counts only the number of occurrences per metavalue)
Definition: LayerStatistics.h:143
std::map< RangeStatsType, RangeStatsVariant > StatsMap
collection of Min/Max/Avg statistics from different sources. Note: must be sorted,...
Definition: LayerStatistics.h:141
std::variant< RangeStatsInt, RangeStatsDouble > RangeStatsVariant
Definition: LayerStatistics.h:103
a simple counting struct, for non-numerical occurrences of meta-values
Definition: LayerStatistics.h:107
Origin and name of a statistic.
Definition: LayerStatistics.h:125
RangeStatsSource src
Definition: LayerStatistics.h:126
bool operator==(const RangeStatsType &rhs) const
Definition: LayerStatistics.h:134
std::string name
Definition: LayerStatistics.h:127
bool operator<(const RangeStatsType &rhs) const
Definition: LayerStatistics.h:129
Struct representing the statistics about a set of values.
Definition: LayerStatistics.h:63
VALUE_TYPE getMin() const
Definition: LayerStatistics.h:73
VALUE_TYPE min_
Definition: LayerStatistics.h:96
size_t getCount() const
Definition: LayerStatistics.h:83
size_t count_
Definition: LayerStatistics.h:95
double getAvg() const
get the average value from all calls to addDataPoint()
Definition: LayerStatistics.h:89
VALUE_TYPE sum_
Definition: LayerStatistics.h:98
void addDataPoint(VALUE_TYPE v)
Definition: LayerStatistics.h:65
VALUE_TYPE max_
Definition: LayerStatistics.h:97
VALUE_TYPE getMax() const
Definition: LayerStatistics.h:78