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

DBoundingBox< D > Class Template Reference
[Datastructures]

A D-dimensional bounding box. More...

#include <OpenMS/DATASTRUCTURES/DBoundingBox.h>

Inheritance diagram for DBoundingBox< D >:
DIntervalBase< D >

List of all members.

Public Types

Type definitions

enum  { DIMENSION = D }
 

Dimensions.

More...
typedef
Internal::DIntervalBase< D > 
Base
 Base class type.
typedef Base::PositionType PositionType
 Position type.
typedef Base::CoordinateType CoordinateType
 Coordinate type of the positions.

Public Member Functions

Constructors and Destructor

 DBoundingBox ()
 Default constructor.
 DBoundingBox (const DBoundingBox &rhs)
 Copy constructor.
DBoundingBoxoperator= (const DBoundingBox &rhs)
 Assignement operator.
DBoundingBoxoperator= (const Base &rhs)
 Assignement operator for the base class.
 ~DBoundingBox ()
 Destructor.
 DBoundingBox (const PositionType &minimum, const PositionType &maximum)
 Constructor from two positions.
Accessors

void enlarge (const PositionType &p)
 Enlarges the bounding box such that it contains a position.
void enlarge (CoordinateType x, CoordinateType y)
 Enlarges the bounding box such that it contains a position specified by two coordinates.
Predicates

bool operator== (const DBoundingBox &rhs) const
 Equality operator.
bool operator== (const Base &rhs) const
 Equality operator.
bool encloses (const PositionType &position) const
 Checks whether this range contains a certain point.
bool encloses (CoordinateType x, CoordinateType y) const
 2D-version encloses(x,y) is for convenience only
bool intersects (const DBoundingBox &bounding_box) const
bool isEmpty () const
 Test if bounding box is empty.

Related Functions

(Note that these are not member functions.)



template<UInt D>
std::ostream & operator<< (std::ostream &os, const DBoundingBox< D > &bounding_box)
 Print the contents to a stream.

Detailed Description

template<UInt D>
class OpenMS::DBoundingBox< D >

A D-dimensional bounding box.

A DBoundingBox denotes a closed interval. Upper and lower margins are both contained.


Member Typedef Documentation

Base class type.

Coordinate type of the positions.

Reimplemented from DIntervalBase< D >.

Position type.

Reimplemented from DIntervalBase< D >.


Member Enumeration Documentation

anonymous enum

Dimensions.

Enumerator:
DIMENSION 

Constructor & Destructor Documentation

DBoundingBox (  )  [inline]

Default constructor.

DBoundingBox ( const DBoundingBox< D > &  rhs  )  [inline]

Copy constructor.

~DBoundingBox (  )  [inline]

Destructor.

DBoundingBox ( const PositionType minimum,
const PositionType maximum 
) [inline]

Constructor from two positions.


Member Function Documentation

bool encloses ( const PositionType position  )  const [inline]

Checks whether this range contains a certain point.

Parameters:
position The point's position.
Returns:
true if point lies inside this area.

Referenced by IDMapper::annotate(), DBoundingBox< 1 >::encloses(), and FeatureFinderAlgorithmPicked< PeakType, FeatureType >::run().

bool encloses ( CoordinateType  x,
CoordinateType  y 
) const [inline]

2D-version encloses(x,y) is for convenience only

void enlarge ( CoordinateType  x,
CoordinateType  y 
) [inline]

Enlarges the bounding box such that it contains a position specified by two coordinates.

void enlarge ( const PositionType p  )  [inline]

Enlarges the bounding box such that it contains a position.

Referenced by DBoundingBox< 1 >::enlarge().

bool intersects ( const DBoundingBox< D > &  bounding_box  )  const [inline]

Checks whether this bounding box intersects with another bounding box

Referenced by FeatureFinderAlgorithmPicked< PeakType, FeatureType >::intersection_().

bool isEmpty (  )  const [inline]

Test if bounding box is empty.

Referenced by FeatureMap< Feature >::updateRanges().

DBoundingBox& operator= ( const Base rhs  )  [inline]

Assignement operator for the base class.

DBoundingBox& operator= ( const DBoundingBox< D > &  rhs  )  [inline]

Assignement operator.

bool operator== ( const Base rhs  )  const [inline]

Equality operator.

bool operator== ( const DBoundingBox< D > &  rhs  )  const [inline]

Equality operator.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  os,
const DBoundingBox< D > &  bounding_box 
) [related]

Print the contents to a stream.


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