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

LibGeoDecomp::Region< DIM > Class Template Reference

Region stores a set of coordinates. More...

#include <region.h>

List of all members.

Classes

class  Iterator
class  StreakIterator

Public Types

typedef std::pair< int, int > IntPair
typedef SuperVector< IntPairVecType

Public Member Functions

 Region ()
template<class ITERATOR1 , class ITERATOR2 >
 Region (const ITERATOR1 &start, const ITERATOR2 &end)
template<class ITERATOR1 , class ITERATOR2 >
void load (const ITERATOR1 &start, const ITERATOR2 &end)
void clear ()
const CoordBox< DIM > & boundingBox () const
const long & size () const
const unsigned numStreaks () const
Region expand (const unsigned &width=1) const
template<typename TOPOLOGY >
Region expandWithTopology (const unsigned &width, const Coord< DIM > &dimensions, TOPOLOGY) const
 does the same as expand, but will wrap overlap at edges correctly.
bool operator== (const Region< DIM > &other) const
bool count (const Streak< DIM > &s) const
bool count (const Coord< DIM > &c) const
template<typename ADDEND >
void insert (const ADDEND &a)
Regionoperator<< (const Streak< DIM > &s)
Regionoperator<< (const Coord< DIM > &c)
Regionoperator<< (CoordBox< DIM > box)
Regionoperator>> (const Streak< DIM > &s)
Regionoperator>> (const Coord< DIM > &c)
void operator-= (const Region &other)
Region operator- (const Region &other) const
void operator&= (const Region &other)
Region operator& (const Region &other) const
void operator+= (const Region &other)
Region operator+ (const Region &other) const
SuperVector< Streak< DIM > > toVector () const
std::string toString () const
bool empty () const
StreakIterator beginStreak () const
StreakIterator endStreak () const
Iterator begin () const
Iterator end () const

Private Member Functions

void determineGeometry () const
void resetGeometryCache () const
Streak< DIM > trimStreak (const Streak< DIM > &s, const Coord< DIM > &dimensions) const
template<typename TOPOLOGY >
void splitStreak (const Streak< DIM > &streak, Region *target, const Coord< DIM > &dimensions) const
template<typename TOPOLOGY >
void normalizeStreak (const Streak< DIM > &streak, Region *target, const Coord< DIM > &dimensions) const

Private Attributes

VecType indices [DIM]
CoordBox< DIM > myBoundingBox
long mySize
bool geometryCacheTainted

Friends

class RegionLookupHelper
class RegionInsertHelper
class RegionRemoveHelper
class RegionTest

Detailed Description

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

Region stores a set of coordinates.

It performs a run-length coding. Instead of storing complete Streak objects, these objects get split up and are stored implicitly in the hierarchical indices vectors.


Member Typedef Documentation

template<int DIM>
typedef std::pair<int, int> LibGeoDecomp::Region< DIM >::IntPair
template<int DIM>
typedef SuperVector<IntPair> LibGeoDecomp::Region< DIM >::VecType

Constructor & Destructor Documentation

template<int DIM>
LibGeoDecomp::Region< DIM >::Region (  )  [inline]
template<int DIM>
template<class ITERATOR1 , class ITERATOR2 >
LibGeoDecomp::Region< DIM >::Region ( const ITERATOR1 &  start,
const ITERATOR2 &  end 
) [inline]

Member Function Documentation

template<int DIM>
Iterator LibGeoDecomp::Region< DIM >::begin ( void   )  const [inline]
template<int DIM>
StreakIterator LibGeoDecomp::Region< DIM >::beginStreak (  )  const [inline]
template<int DIM>
const CoordBox<DIM>& LibGeoDecomp::Region< DIM >::boundingBox (  )  const [inline]
template<int DIM>
void LibGeoDecomp::Region< DIM >::clear (  )  [inline]
template<int DIM>
bool LibGeoDecomp::Region< DIM >::count ( const Streak< DIM > &  s  )  const [inline]
template<int DIM>
bool LibGeoDecomp::Region< DIM >::count ( const Coord< DIM > &  c  )  const [inline]
template<int DIM>
void LibGeoDecomp::Region< DIM >::determineGeometry (  )  const [inline, private]
template<int DIM>
bool LibGeoDecomp::Region< DIM >::empty ( void   )  const [inline]
template<int DIM>
Iterator LibGeoDecomp::Region< DIM >::end ( void   )  const [inline]
template<int DIM>
StreakIterator LibGeoDecomp::Region< DIM >::endStreak (  )  const [inline]
template<int DIM>
Region LibGeoDecomp::Region< DIM >::expand ( const unsigned &  width = 1  )  const [inline]
template<int DIM>
template<typename TOPOLOGY >
Region LibGeoDecomp::Region< DIM >::expandWithTopology ( const unsigned &  width,
const Coord< DIM > &  dimensions,
TOPOLOGY   
) const [inline]
template<int DIM>
template<typename ADDEND >
void LibGeoDecomp::Region< DIM >::insert ( const ADDEND &  a  )  [inline]
template<int DIM>
template<class ITERATOR1 , class ITERATOR2 >
void LibGeoDecomp::Region< DIM >::load ( const ITERATOR1 &  start,
const ITERATOR2 &  end 
) [inline]
template<int DIM>
template<typename TOPOLOGY >
void LibGeoDecomp::Region< DIM >::normalizeStreak ( const Streak< DIM > &  streak,
Region< DIM > *  target,
const Coord< DIM > &  dimensions 
) const [inline, private]
template<int DIM>
const unsigned LibGeoDecomp::Region< DIM >::numStreaks (  )  const [inline]
template<int DIM>
Region LibGeoDecomp::Region< DIM >::operator& ( const Region< DIM > &  other  )  const [inline]
template<int DIM>
void LibGeoDecomp::Region< DIM >::operator&= ( const Region< DIM > &  other  )  [inline]
template<int DIM>
Region LibGeoDecomp::Region< DIM >::operator+ ( const Region< DIM > &  other  )  const [inline]
template<int DIM>
void LibGeoDecomp::Region< DIM >::operator+= ( const Region< DIM > &  other  )  [inline]
template<int DIM>
Region LibGeoDecomp::Region< DIM >::operator- ( const Region< DIM > &  other  )  const [inline]
template<int DIM>
void LibGeoDecomp::Region< DIM >::operator-= ( const Region< DIM > &  other  )  [inline]
template<int DIM>
Region& LibGeoDecomp::Region< DIM >::operator<< ( const Streak< DIM > &  s  )  [inline]
template<int DIM>
Region& LibGeoDecomp::Region< DIM >::operator<< ( const Coord< DIM > &  c  )  [inline]
template<int DIM>
Region& LibGeoDecomp::Region< DIM >::operator<< ( CoordBox< DIM >  box  )  [inline]
template<int DIM>
bool LibGeoDecomp::Region< DIM >::operator== ( const Region< DIM > &  other  )  const [inline]
template<int DIM>
Region& LibGeoDecomp::Region< DIM >::operator>> ( const Coord< DIM > &  c  )  [inline]
template<int DIM>
Region& LibGeoDecomp::Region< DIM >::operator>> ( const Streak< DIM > &  s  )  [inline]
template<int DIM>
void LibGeoDecomp::Region< DIM >::resetGeometryCache (  )  const [inline, private]
template<int DIM>
const long& LibGeoDecomp::Region< DIM >::size ( void   )  const [inline]
template<int DIM>
template<typename TOPOLOGY >
void LibGeoDecomp::Region< DIM >::splitStreak ( const Streak< DIM > &  streak,
Region< DIM > *  target,
const Coord< DIM > &  dimensions 
) const [inline, private]
template<int DIM>
std::string LibGeoDecomp::Region< DIM >::toString (  )  const [inline]
template<int DIM>
SuperVector<Streak<DIM> > LibGeoDecomp::Region< DIM >::toVector (  )  const [inline]
template<int DIM>
Streak<DIM> LibGeoDecomp::Region< DIM >::trimStreak ( const Streak< DIM > &  s,
const Coord< DIM > &  dimensions 
) const [inline, private]

Friends And Related Function Documentation

template<int DIM>
friend class RegionInsertHelper [friend]
template<int DIM>
friend class RegionLookupHelper [friend]
template<int DIM>
friend class RegionRemoveHelper [friend]
template<int DIM>
friend class RegionTest [friend]

Member Data Documentation

template<int DIM>
bool LibGeoDecomp::Region< DIM >::geometryCacheTainted [mutable, private]
template<int DIM>
VecType LibGeoDecomp::Region< DIM >::indices[DIM] [private]
template<int DIM>
CoordBox<DIM> LibGeoDecomp::Region< DIM >::myBoundingBox [mutable, private]
template<int DIM>
long LibGeoDecomp::Region< DIM >::mySize [mutable, private]

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