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

Aim: More...

#include <Morton.h>

Public Types

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

Static Public Member Functions

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

Static Public Attributes

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

Detailed Description

template<typename THashKey, typename TPoint>
struct 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

Member Function Documentation

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

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.

References DGtal::Morton< THashKey, TPoint >::Dimension, and bits::mask().

template<typename THashKey , typename TPoint >
static void DGtal::Morton< THashKey, TPoint >::childrenKeys ( const HashKey  key,
HashKey result 
) [inline, static]

Computes the children keys of the key passed in parameter.

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

References DGtal::Morton< THashKey, TPoint >::Dimension, and bits::mask().

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

Computes the coordinates correspponding to a key.

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

References DGtal::Morton< THashKey, TPoint >::Dimension.

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

Interleave the bits of the nbIn inputs.

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

References DGtal::Morton< THashKey, TPoint >::Dimension.

Referenced by DGtal::Morton< THashKey, TPoint >::keyFromCoordinates().

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

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.

References DGtal::Morton< THashKey, TPoint >::Dimension, and DGtal::Morton< THashKey, TPoint >::interleaveBits().

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

Returns the parent key of a key passed in parameter.

Parameters:
key The key.

References DGtal::Morton< THashKey, TPoint >::Dimension.


Field Documentation

template<typename THashKey , typename TPoint >
const std::size_t DGtal::Morton< THashKey, TPoint >::Dimension = Point::Dimension [static]

The documentation for this struct was generated from the following file:
Generated on Fri Sep 17 17:30:02 2010 for DGtal by  doxygen 1.6.3