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

DGtal::Morton< THashKey, TPoint > Class Template Reference

Aim: More...

#include <Morton.h>

Inheritance diagram for DGtal::Morton< THashKey, TPoint >:
Inheritance graph
[legend]

Public Types

typedef THashKey HashKey
typedef TPoint Point
typedef Point::Coordinate Coordinate

Public Member Functions

 Morton ()
void interleaveBits (const Point &aPoint, HashKey &output) const
HashKey keyFromCoordinates (const std::size_t treeDepth, const Point &coordinates) const
void coordinatesFromKey (const HashKey key, Point &coordinates) const
HashKey parentKey (const HashKey key) const
void brotherKeys (const HashKey key, HashKey *result) const
void childrenKeys (const HashKey key, HashKey *result) const

Static Public Attributes

static const std::size_t Dimension = Point::Dimension

Private Attributes

boost::array< HashKey, LOG2
< sizeof(HashKey)*8 >::VALUE > 
myDilateMasks
boost::array< HashKey, LOG2
< sizeof(HashKey)*8 >::VALUE > 
myContractMasks

Detailed Description

template<typename THashKey, typename TPoint>
class DGtal::Morton< THashKey, TPoint >

Aim:

Description of template class 'Morton'

Todo:

Member Typedef Documentation

template<typename THashKey, typename TPoint>
typedef Point::Coordinate DGtal::Morton< THashKey, TPoint >::Coordinate
template<typename THashKey, typename TPoint>
typedef THashKey DGtal::Morton< THashKey, TPoint >::HashKey
template<typename THashKey, typename TPoint>
typedef TPoint DGtal::Morton< THashKey, TPoint >::Point

Constructor & Destructor Documentation

template<typename THashKey, typename TPoint>
DGtal::Morton< THashKey, TPoint >::Morton (  ) 

Constructor


Member Function Documentation

template<typename THashKey, typename TPoint>
void DGtal::Morton< THashKey, TPoint >::brotherKeys ( const HashKey  key,
HashKey result 
) const

Computes the brother keys (ie the keys having the same parent) of the key passed in parameter.

Parameters:
key The key.
result Will contain the resulting brother keys.
template<typename THashKey, typename TPoint>
void DGtal::Morton< THashKey, TPoint >::childrenKeys ( const HashKey  key,
HashKey result 
) const

Computes the children keys of the key passed in parameter.

Parameters:
key The key.
result Will contain the resulting children keys.

Referenced by testMorton().

template<typename THashKey, typename TPoint>
void DGtal::Morton< THashKey, TPoint >::coordinatesFromKey ( const HashKey  key,
Point coordinates 
) const

Computes the coordinates correspponding to a key.

Parameters:
key The key.
coordinates Will contain the resulting coordinates.

Referenced by testMorton().

template<typename THashKey, typename TPoint>
void DGtal::Morton< THashKey, TPoint >::interleaveBits ( const Point aPoint,
HashKey output 
) const

Interleave the bits of the nbIn inputs.

Parameters:
input an array of the nbIn values to mix in.
output The result

Referenced by testMorton().

template<typename THashKey, typename TPoint>
HashKey DGtal::Morton< THashKey, TPoint >::keyFromCoordinates ( const std::size_t  treeDepth,
const Point coordinates 
) const

Returns the key corresponding to the coordinates passed in the parameters.

Parameters:
treeDepth The depth at which the coordinates are to be read (usualy corresponds to the deepest leave).
coordinates An array containing the coordinates to convert into a key.

Referenced by testMorton().

template<typename THashKey, typename TPoint>
HashKey DGtal::Morton< THashKey, TPoint >::parentKey ( const HashKey  key  )  const [inline]

Returns the parent key of a key passed in parameter.

Parameters:
key The key.

Field Documentation

template<typename THashKey, typename TPoint>
const std::size_t DGtal::Morton< THashKey, TPoint >::Dimension = Point::Dimension [static]
template<typename THashKey, typename TPoint>
boost::array< HashKey,LOG2<sizeof(HashKey)*8>::VALUE> DGtal::Morton< THashKey, TPoint >::myContractMasks [private]
template<typename THashKey, typename TPoint>
boost::array< HashKey,LOG2<sizeof(HashKey)*8>::VALUE> DGtal::Morton< THashKey, TPoint >::myDilateMasks [private]

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