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

RangeUtils
[Kernel]


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 DRawDataPoint 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< Spectrum<Peak1D> > spectra;
    
    //... spectra are added to the vector ...
    
    //range from 0.0 to 36.0 s
    InRTRange< Spectrum<Peak1D> > 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
    Spectrum<Peak1D> 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());


Classes

class  InRTRange
 Predicate that determines if a spectrum lies inside/outside a specific retention time range. More...
class  InMSLevelRange
 Predicate that determines if a spectrum lies inside/outside a specific MS level set. More...
class  HasScanMode
 Predicate that determines if a spectrum has a certain scan mode. More...
class  IsEmptySpectrum
 Predicate that determines if a spectrum is empty. More...
class  InMzRange
 Predicate that determines if a peak lies inside/outside a specific m/z range. More...
class  InIntensityRange
 Predicate that determines if a peak lies inside/outside a specific intensity range. More...


Generated Tue Apr 1 15:36:40 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1