This class implements the H-Indexing scheme for arbitrary rectangles. More...
#include <hindexingpartition.h>
Inherits SpaceFillingCurve< 2 >.
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 |
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
typedef std::vector<Coord<2> > LibGeoDecomp::HIndexingPartition::CoordVector |
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] |
Iterator LibGeoDecomp::HIndexingPartition::begin | ( | ) | const [inline] |
Iterator LibGeoDecomp::HIndexingPartition::end | ( | ) | const [inline] |
static bool LibGeoDecomp::HIndexingPartition::fillCaches | ( | ) | [inline, static, private] |
References LibGeoDecomp::Coord< 2 >::x(), and LibGeoDecomp::Coord< 2 >::y().
Region<2> LibGeoDecomp::HIndexingPartition::getRegion | ( | const std::size_t | node | ) | const [inline, virtual] |
Implements LibGeoDecomp::Partition< DIM >.
friend class HIndexingPartitionTest [friend] |
bool LibGeoDecomp::HIndexingPartition::cachesInitialized = HIndexingPartition::fillCaches() [static] |
Coord<2> LibGeoDecomp::HIndexingPartition::dimensions [private] |
Coord< 2 > LibGeoDecomp::HIndexingPartition::maxCachedDimensions [static] |
Coord<2> LibGeoDecomp::HIndexingPartition::origin [private] |
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] |
{ {0,1,2,0}, {1,3,0,1}, {2,0,3,2}, {3,2,1,3} }