OpenMS
Loading...
Searching...
No Matches
RangeIntensity Struct Reference

#include <OpenMS/KERNEL/RangeManager.h>

Inheritance diagram for RangeIntensity:
[legend]
Collaboration diagram for RangeIntensity:
[legend]

Public Member Functions

void extendIntensity (const double value)
 extend the range such that it includes the given value
 
bool containsIntensity (const double value) const
 is value within [min, max]?
 
bool containsIntensity (const RangeBase &inner_range) const
 is the range inner_range within [min, max] of this range?
 
 RangeBase ()=default
 C'tor: initialize with empty range.
 
 RangeBase (const double single)
 Cutom C'tor which sets the range to a singular point.
 
 RangeBase (const double min, const double max)
 
 RangeBase (const RangeBase &rhs)=default
 Copy C'tor.
 
 RangeBase (RangeBase &&rhs) noexcept=default
 Move C'tor (seems useless, but is required for completeness in derived classes' move c'tor)
 
RangeBaseoperator= (const RangeBase &rhs)=default
 Assignment operator.
 
RangeBaseoperator= (RangeBase &&rhs) noexcept=default
 Move assignment (seems useless, but is required for completeness in derived classes' move c'tor)
 
Accessors for min and max

We use accessors, to keep range consistent (i.e. ensure that min <= max)

void setMinIntensity (const double min)
 sets the minimum (and the maximum, if uninitialized)
 
void setMaxIntensity (const double max)
 sets the maximum (and the minimum, if uninitialized)
 
double getMinIntensity () const
 
double getMaxIntensity () const
 
- Public Member Functions inherited from RangeBase
 RangeBase ()=default
 C'tor: initialize with empty range.
 
 RangeBase (const double single)
 Cutom C'tor which sets the range to a singular point.
 
 RangeBase (const double min, const double max)
 
 RangeBase (const RangeBase &rhs)=default
 Copy C'tor.
 
 RangeBase (RangeBase &&rhs) noexcept=default
 Move C'tor (seems useless, but is required for completeness in derived classes' move c'tor)
 
RangeBaseoperator= (const RangeBase &rhs)=default
 Assignment operator.
 
RangeBaseoperator= (RangeBase &&rhs) noexcept=default
 Move assignment (seems useless, but is required for completeness in derived classes' move c'tor)
 
 ~RangeBase () noexcept=default
 D'tor.
 
 operator RangeRT () const
 
 operator RangeMZ () const
 
 operator RangeIntensity () const
 
 operator RangeMobility () const
 
void clear ()
 make the range empty, i.e. isEmpty() will be true
 
bool isEmpty () const
 is the range empty (i.e. min > max)?
 
bool contains (const double value) const
 is value within [min, max]?
 
bool contains (const RangeBase &inner_range) const
 is the range inner_range within [min, max]?
 
void extend (const RangeBase &other)
 ensure the range includes the range of other
 
void extend (const double value)
 extend the range such that it includes the given value
 
void extendLeftRight (const double by)
 
void minSpanIfSingular (const double min_span)
 If the current range is a single point, e.g. min==max, then extend the range by min_span / 2 on either side.
 
void clampTo (const RangeBase &other)
 
void pushInto (const RangeBase &sandbox)
 
void scaleBy (const double factor)
 Scale the range of the dimension by a factor. A factor > 1 increases the range; factor < 1 decreases it.
 
void shift (const double distance)
 
double center () const
 
double getSpan () const
 
bool operator== (const RangeBase &rhs) const
 
std::pair< double, double > getNonEmptyRange () const
 Return the current range, or (if empty) a full range (-1e308, 1e308).
 
void setMin (const double min)
 sets the minimum (and the maximum, if uninitialized)
 
void setMax (const double max)
 sets the maximum (and the minimum, if uninitialized)
 
double getMin () const
 
double getMax () const
 

Static Public Attributes

static const MSDim DIM = MSDim::INT
 

Additional Inherited Members

- Protected Attributes inherited from RangeBase
double min_ = std::numeric_limits<double>::max()
 
double max_ = std::numeric_limits<double>::lowest()
 

Member Function Documentation

◆ containsIntensity() [1/2]

bool containsIntensity ( const double  value) const
inline

is value within [min, max]?

◆ containsIntensity() [2/2]

bool containsIntensity ( const RangeBase inner_range) const
inline

is the range inner_range within [min, max] of this range?

◆ extendIntensity()

void extendIntensity ( const double  value)
inline

extend the range such that it includes the given value

◆ getMaxIntensity()

double getMaxIntensity ( ) const
inline

Get the maximum intensity value of the range

Exceptions
Exception::InvalidRangeif the range is empty

◆ getMinIntensity()

double getMinIntensity ( ) const
inline

Get the minimum intensity value of the range

Exceptions
Exception::InvalidRangeif the range is empty

◆ operator=() [1/2]

RangeBase & operator= ( const RangeBase rhs)
default

Assignment operator.

◆ operator=() [2/2]

RangeBase & operator= ( RangeBase &&  rhs)
defaultnoexcept

Move assignment (seems useless, but is required for completeness in derived classes' move c'tor)

◆ RangeBase() [1/5]

RangeBase ( )
default

C'tor: initialize with empty range.

◆ RangeBase() [2/5]

RangeBase ( const double  min,
const double  max 
)
inline

Custom C'tor to set min and max

Exceptions
Exception::InvalidRangeif min > max

◆ RangeBase() [3/5]

RangeBase ( const double  single)
inline

Cutom C'tor which sets the range to a singular point.

◆ RangeBase() [4/5]

RangeBase ( const RangeBase rhs)
default

Copy C'tor.

◆ RangeBase() [5/5]

RangeBase ( RangeBase &&  rhs)
defaultnoexcept

Move C'tor (seems useless, but is required for completeness in derived classes' move c'tor)

◆ setMaxIntensity()

void setMaxIntensity ( const double  max)
inline

sets the maximum (and the minimum, if uninitialized)

◆ setMinIntensity()

void setMinIntensity ( const double  min)
inline

sets the minimum (and the maximum, if uninitialized)

Member Data Documentation

◆ DIM

const MSDim DIM = MSDim::INT
static