Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends

LibGeoDecomp::HIndexingPartition::Iterator Class Reference

#include <hindexingpartition.h>

Inherits LibGeoDecomp::SpaceFillingCurve::Iterator.

Collaboration diagram for LibGeoDecomp::HIndexingPartition::Iterator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Iterator (const Coord< 2 > &_origin, const Coord< 2 > &dimensions, const unsigned &pos=0)
 Returns an iterator that will traverse the rectangle specified by _origin and dimensions.
 Iterator (const Coord< 2 > &origin, const unsigned &initType, const Coord< 2 > &dimensions)
 Returns an iterator that will traverse only the rectangle of type initType.
 Iterator (const Coord< 2 > &_origin)
 Returns an "end" iterator, meaning that the iterator will be frozen at position origin.
Iteratoroperator++ ()

Private Member Functions

void digUp ()
 Ripple carry bits up and clean up completed triangles.
void digDown ()
 Initialize lower level triangles.
void digDownCached (const Triangle &triangle, const unsigned &counter=0)
void digDownTrivial (const Triangle &triangle, const unsigned &counter=0)
bool traceTriangle (const Triangle &curTria, unsigned *remainder)
 Finds the triangle in curTria, in which the coordinate with position remainder is located.
void skipSubTriangles (const Triangle &curTria, unsigned *remainder)
 Finds the sub triangle of curTria, in which the position on the SFC remainder resides.
void nextSublevel ()
void nextTrivial ()
void nextCached ()
bool sublevelTriangleFinished () const
bool trivialTriangleFinished () const
bool cachedTriangleFinished () const
bool isCached (const Coord< 2 > &dimensions) const

Static Private Member Functions

static void nextSubTriangle (Triangle *triangle)
static void newOriginAndDimensions (Coord< 2 > *curOri, Coord< 2 > *curDim, const int &curType, const int &curCounter)
static Coord< 2 > newOrigin (const int &curType, const int &curCounter, const int &leftHalf, const int &rightHalf, const int &upperHalf, const int &lowerHalf, const int &x, const int &y)
static Coord< 2 > subtriangleDimensions (const Coord< 2 > &dimensions, const unsigned &type)
static unsigned triangleLength (const Triangle &triangle)
static unsigned triangleLength (const Coord< 2 > &dimensions, const unsigned &type)

Private Attributes

std::vector< TriangletriangleStack
Coord< 2 > cachedTriangleOrigin
Coord< 2 > * cachedTriangleCoordsIterator
Coord< 2 > * cachedTriangleCoordsEnd
Coord< 2 > trivialTriangleDirection
unsigned trivialTriangleType
unsigned trivialTriangleCounter
unsigned trivialTriangleLength

Friends

class HIndexingPartitionTest

Constructor & Destructor Documentation

LibGeoDecomp::HIndexingPartition::Iterator::Iterator ( const Coord< 2 > &  _origin,
const Coord< 2 > &  dimensions,
const unsigned pos = 0 
) [inline]

Returns an iterator that will traverse the rectangle specified by _origin and dimensions.

Traversal will start at position pos according to the SFC linearization.

References LibGeoDecomp::pop().

LibGeoDecomp::HIndexingPartition::Iterator::Iterator ( const Coord< 2 > &  origin,
const unsigned initType,
const Coord< 2 > &  dimensions 
) [inline]

Returns an iterator that will traverse only the rectangle of type initType.

LibGeoDecomp::HIndexingPartition::Iterator::Iterator ( const Coord< 2 > &  _origin  )  [inline, explicit]

Returns an "end" iterator, meaning that the iterator will be frozen at position origin.


Member Function Documentation

bool LibGeoDecomp::HIndexingPartition::Iterator::cachedTriangleFinished (  )  const [inline, private]
void LibGeoDecomp::HIndexingPartition::Iterator::digDown (  )  [inline, private]

Initialize lower level triangles.

References LibGeoDecomp::HIndexingPartition::Triangle::dimensions, and LibGeoDecomp::pop().

void LibGeoDecomp::HIndexingPartition::Iterator::digDownCached ( const Triangle triangle,
const unsigned counter = 0 
) [inline, private]
void LibGeoDecomp::HIndexingPartition::Iterator::digDownTrivial ( const Triangle triangle,
const unsigned counter = 0 
) [inline, private]
void LibGeoDecomp::HIndexingPartition::Iterator::digUp (  )  [inline, private]

Ripple carry bits up and clean up completed triangles.

bool LibGeoDecomp::HIndexingPartition::Iterator::isCached ( const Coord< 2 > &  dimensions  )  const [inline, private]
static Coord<2> LibGeoDecomp::HIndexingPartition::Iterator::newOrigin ( const int &  curType,
const int &  curCounter,
const int &  leftHalf,
const int &  rightHalf,
const int &  upperHalf,
const int &  lowerHalf,
const int &  x,
const int &  y 
) [inline, static, private]
static void LibGeoDecomp::HIndexingPartition::Iterator::newOriginAndDimensions ( Coord< 2 > *  curOri,
Coord< 2 > *  curDim,
const int &  curType,
const int &  curCounter 
) [inline, static, private]
void LibGeoDecomp::HIndexingPartition::Iterator::nextCached (  )  [inline, private]
void LibGeoDecomp::HIndexingPartition::Iterator::nextSublevel (  )  [inline, private]

References LibGeoDecomp::TRIVIAL.

static void LibGeoDecomp::HIndexingPartition::Iterator::nextSubTriangle ( Triangle triangle  )  [inline, static, private]
void LibGeoDecomp::HIndexingPartition::Iterator::nextTrivial (  )  [inline, private]
Iterator& LibGeoDecomp::HIndexingPartition::Iterator::operator++ (  )  [inline]
void LibGeoDecomp::HIndexingPartition::Iterator::skipSubTriangles ( const Triangle curTria,
unsigned remainder 
) [inline, private]

Finds the sub triangle of curTria, in which the position on the SFC remainder resides.

bool LibGeoDecomp::HIndexingPartition::Iterator::sublevelTriangleFinished (  )  const [inline, private]

References LibGeoDecomp::TRIVIAL.

static Coord<2> LibGeoDecomp::HIndexingPartition::Iterator::subtriangleDimensions ( const Coord< 2 > &  dimensions,
const unsigned type 
) [inline, static, private]
bool LibGeoDecomp::HIndexingPartition::Iterator::traceTriangle ( const Triangle curTria,
unsigned remainder 
) [inline, private]

Finds the triangle in curTria, in which the coordinate with position remainder is located.

Returns true if recursion is necessary to check the resulting sub triangle.

References LibGeoDecomp::HIndexingPartition::Triangle::dimensions.

static unsigned LibGeoDecomp::HIndexingPartition::Iterator::triangleLength ( const Triangle triangle  )  [inline, static, private]
static unsigned LibGeoDecomp::HIndexingPartition::Iterator::triangleLength ( const Coord< 2 > &  dimensions,
const unsigned type 
) [inline, static, private]
bool LibGeoDecomp::HIndexingPartition::Iterator::trivialTriangleFinished (  )  const [inline, private]

Friends And Related Function Documentation

friend class HIndexingPartitionTest [friend]

Member Data Documentation


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