35 #ifndef OPENMS_FILTERING_TRANSFORMERS_NLARGEST_H 36 #define OPENMS_FILTERING_TRANSFORMERS_NLARGEST_H 78 template <
typename SpectrumType>
81 if (spectrum.size() <= peakcount_)
return;
87 std::vector<Size> indices;
88 for (
Size i = 0; i != peakcount_; ++i)
97 void filterPeakMap(
PeakMap & exp);
104 void updateMembers_();
113 #endif //OPENMS_FILTERING_TRANSFORMERS_NLARGEST_H
unsigned int UInt
Unsigned integer type.
Definition: Types.h:95
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
void sortByIntensity(bool reverse=false)
Lexicographically sorts the peaks by their intensity.
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
void filterSpectrum(SpectrumType &spectrum)
Definition: NLargest.h:79
NLargest removes all but the n largest peaks.
Definition: NLargest.h:55
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
MSSpectrum & select(const std::vector< Size > &indices)
UInt peakcount_
Definition: NLargest.h:105