Classes | Public Member Functions | Public Attributes | Private Member Functions | Friends

LibGeoDecomp::CoordBox< DIM > Class Template Reference

CoordBox describes a rectangular, N-dimensional set of coordinates. More...

#include <coordbox.h>

Collaboration diagram for LibGeoDecomp::CoordBox< DIM >:
Collaboration graph
[legend]

List of all members.

Classes

class  Iterator
class  StreakIterator

Public Member Functions

 CoordBox (const Coord< DIM > &origin=Coord< DIM >(), const Coord< DIM > &dimensions=Coord< DIM >())
bool operator== (const CoordBox &other) const
bool operator!= (const CoordBox &other) const
Iterator begin () const
StreakIterator beginStreak () const
Iterator end () const
StreakIterator endStreak () const
bool inBounds (const Coord< DIM > &coord) const
 checks whether the box' volume includes coord.
std::string toString () const
bool intersects (const CoordBox &other) const
unsigned size () const

Public Attributes

Coord< DIM > origin
Coord< DIM > dimensions

Private Member Functions

Coord< 1 > endPos (const Coord< 1 > &origin, const Coord< 1 > &dimensions) const
template<int DIM2>
Coord< DIM2 > endPos (const Coord< DIM2 > &origin, const Coord< DIM2 > &dimensions) const

Friends

class Serialization
class Typemaps

Detailed Description

template<int DIM>
class LibGeoDecomp::CoordBox< DIM >

CoordBox describes a rectangular, N-dimensional set of coordinates.

If can be used for iteration and supports bounds checking. This makes it useful for writing code which is independed of the dimensionality of its data.


Constructor & Destructor Documentation

template<int DIM>
LibGeoDecomp::CoordBox< DIM >::CoordBox ( const Coord< DIM > &  origin = Coord<DIM>(),
const Coord< DIM > &  dimensions = Coord<DIM>() 
) [inline, explicit]

Member Function Documentation

template<int DIM>
Iterator LibGeoDecomp::CoordBox< DIM >::begin (  )  const [inline]
template<int DIM>
StreakIterator LibGeoDecomp::CoordBox< DIM >::beginStreak (  )  const [inline]
template<int DIM>
Iterator LibGeoDecomp::CoordBox< DIM >::end (  )  const [inline]
template<int DIM>
Coord<1> LibGeoDecomp::CoordBox< DIM >::endPos ( const Coord< 1 > &  origin,
const Coord< 1 > &  dimensions 
) const [inline, private]
template<int DIM>
template<int DIM2>
Coord<DIM2> LibGeoDecomp::CoordBox< DIM >::endPos ( const Coord< DIM2 > &  origin,
const Coord< DIM2 > &  dimensions 
) const [inline, private]
template<int DIM>
StreakIterator LibGeoDecomp::CoordBox< DIM >::endStreak (  )  const [inline]
template<int DIM>
bool LibGeoDecomp::CoordBox< DIM >::inBounds ( const Coord< DIM > &  coord  )  const [inline]

checks whether the box' volume includes coord.

Referenced by LibGeoDecomp::copy(), and LibGeoDecomp::CoordBox< 3 >::intersects().

template<int DIM>
bool LibGeoDecomp::CoordBox< DIM >::intersects ( const CoordBox< DIM > &  other  )  const [inline]
template<int DIM>
bool LibGeoDecomp::CoordBox< DIM >::operator!= ( const CoordBox< DIM > &  other  )  const [inline]
template<int DIM>
bool LibGeoDecomp::CoordBox< DIM >::operator== ( const CoordBox< DIM > &  other  )  const [inline]
template<int DIM>
unsigned LibGeoDecomp::CoordBox< DIM >::size (  )  const [inline]
template<int DIM>
std::string LibGeoDecomp::CoordBox< DIM >::toString (  )  const [inline]

Friends And Related Function Documentation

template<int DIM>
friend class Serialization [friend]
template<int DIM>
friend class Typemaps [friend]

Member Data Documentation

template<int DIM>
Coord<DIM> LibGeoDecomp::CoordBox< DIM >::dimensions
template<int DIM>
Coord<DIM> LibGeoDecomp::CoordBox< DIM >::origin

The documentation for this class was generated from the following file: