35 #ifndef OPENMS_FILTERING_TRANSFORMERS_SCALER_H 36 #define OPENMS_FILTERING_TRANSFORMERS_SCALER_H 74 template <
typename SpectrumType>
77 if (spectrum.empty())
return;
80 typename SpectrumType::size_type count = spectrum.size();
87 if (it->getIntensity() != last_int)
91 last_int = it->getIntensity();
92 it->setIntensity(count);
94 while (it != spectrum.begin());
99 void filterPeakMap(
PeakMap & exp);
108 #endif //OPENMS_FILTERING_TRANSFORMERS_SCALER_H
void filterSpectrum(SpectrumType &spectrum)
Definition: Scaler.h:75
Scaler scales the peak by ranking the peaks and assigning intensity according to rank.
Definition: Scaler.h:52
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
ContainerType::iterator Iterator
Mutable iterator.
Definition: MSSpectrum.h:102
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
float IntensityType
Intensity type.
Definition: Peak1D.h:64
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92