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

LibGeoDecomp::HIndexingPartition Class Reference

This class implements the H-Indexing scheme for arbitrary rectangles. More...

#include <hindexingpartition.h>

Inherits SpaceFillingCurve< 2 >.

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

List of all members.

Classes

class  Iterator
class  Triangle

Public Types

typedef std::vector< Coord< 2 > > CoordVector

Public Member Functions

 HIndexingPartition (const Coord< 2 > &origin=Coord< 2 >(0, 0), const Coord< 2 > &dimensions=Coord< 2 >(0, 0), const long &offset=0, const std::vector< std::size_t > &weights=std::vector< std::size_t >(2))
Iterator begin () const
Iterator end () const
Region< 2 > getRegion (const std::size_t node) const
Iterator operator[] (const unsigned &pos) const

Static Public Attributes

static int triangleTransitions [4][4]
static boost::shared_ptr
< boost::multi_array
< CoordVector, 3 > > 
triangleCoordsCache
static Coord< 2 > maxCachedDimensions
static std::map< std::pair
< Coord< 2 >, unsigned >
, unsigned
triangleLengthCache
static bool cachesInitialized = HIndexingPartition::fillCaches()

Static Private Member Functions

static bool fillCaches ()

Private Attributes

Coord< 2 > origin
Coord< 2 > dimensions

Friends

class HIndexingPartitionTest

Detailed Description

This class implements the H-Indexing scheme for arbitrary rectangles.

Note:

It's core abstractions is the triangle. To fill (i.e. traverse) a rectangle, it will fill two right triangles. Each triangle will then be broken down into four smaller triangles. The triangles are distinguished by their orientation and direction of traversal. There are four types:

(names derrived from direction of vector from Start to End,upper triangles dominate the diagonal)

triangle types:

0. upper right (ur)

XXX End XX X Start

1. upper left (ul)

End X XX Start

2. lower right (lr)

Start XXX XX X End

3. lower left (ll)

Start X XX End


Member Typedef Documentation

typedef std::vector<Coord<2> > LibGeoDecomp::HIndexingPartition::CoordVector

Constructor & Destructor Documentation

LibGeoDecomp::HIndexingPartition::HIndexingPartition ( const Coord< 2 > &  origin = Coord<2>(0, 0),
const Coord< 2 > &  dimensions = Coord<2>(0, 0),
const long &  offset = 0,
const std::vector< std::size_t > &  weights = std::vector<std::size_t>(2) 
) [inline, explicit]

Member Function Documentation

Iterator LibGeoDecomp::HIndexingPartition::begin (  )  const [inline]
Iterator LibGeoDecomp::HIndexingPartition::end (  )  const [inline]
static bool LibGeoDecomp::HIndexingPartition::fillCaches (  )  [inline, static, private]
Region<2> LibGeoDecomp::HIndexingPartition::getRegion ( const std::size_t  node  )  const [inline, virtual]
Iterator LibGeoDecomp::HIndexingPartition::operator[] ( const unsigned pos  )  const [inline]

Friends And Related Function Documentation

friend class HIndexingPartitionTest [friend]

Member Data Documentation

bool LibGeoDecomp::HIndexingPartition::cachesInitialized = HIndexingPartition::fillCaches() [static]
boost::shared_ptr< boost::multi_array< std::vector< Coord< 2 > >, 3 > > LibGeoDecomp::HIndexingPartition::triangleCoordsCache [static]
std::map< std::pair< Coord< 2 >, unsigned >, unsigned > LibGeoDecomp::HIndexingPartition::triangleLengthCache [static]
Initial value:
 {
    {0,1,2,0},
    {1,3,0,1},
    {2,0,3,2},
    {3,2,1,3}
}

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