Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes

RangeUtils
[Kernel]

Predicates for range operations. More...

Classes

class  HasMetaValue< MetaContainer >
 Predicate that determines if a class has a certain metavalue. More...
class  InRTRange< SpectrumType >
 Predicate that determines if a spectrum lies inside/outside a specific retention time range. More...
class  InMSLevelRange< SpectrumType >
 Predicate that determines if a spectrum lies inside/outside a specific MS level set. More...
class  HasScanMode< SpectrumType >
 Predicate that determines if a spectrum has a certain scan mode. More...
class  IsEmptySpectrum< SpectrumType >
 Predicate that determines if a spectrum is empty. More...
class  IsZoomSpectrum< SpectrumType >
 Predicate that determines if a spectrum is a zoom (enhanced resolution) spectrum. More...
class  HasActivationMethod< SpectrumType >
 Predicate that determines if a spectrum was generated using any activation method given in the constructor list. More...
class  InPrecursorMZRange< SpectrumType >
 Predicate that determines if a spectrum's precursor is within a certain m/z range. More...
class  HasPrecursorCharge< SpectrumType >
 Predicate that determines if a spectrum has a certain precursor charge as given in the constructor list. More...
class  InMzRange< PeakType >
 Predicate that determines if a peak lies inside/outside a specific m/z range. More...
class  InIntensityRange< PeakType >
 Predicate that determines if a peak lies inside/outside a specific intensity range. More...

Detailed Description

Predicates for range operations.

A group of predicates that can be used to perform range operations on MS data. They operate on classes that have the save interface as Spectrum or Peak1D or Peak2D, respectively.

The code for the removal of spectra in a certain retention time range from a vector of spectra might look like this:

    //data
    std::vector< MSSpectrum<> > spectra;

    //... spectra are added to the vector ...

    //range from 0.0 to 36.0 s
    InRTRange< MSSpectrum<> > range(0.0, 36.0);

    //remove the range
    spectra.erase(remove_if(spectra.begin(), spectra.end(), range), spectra.end());

The code for the removal of peaks within certain intensity range from a spectrum might look like this:

    //data
    MSSpectrum<> spectrum;

    //... peaks are added to the spectrum ...

    //range from 0.0 to 5000.0 intensity
    InIntensityRange range< Peak1D >(0.0, 5000.0);

    //remove the range
    spectrum.erase(remove_if(spectrum.begin(), spectrum.end(), range), spectrum.end());

OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:48 using doxygen 1.7.1