bits::morton Namespace Reference

Typedefs

typedef unsigned hashKey

Functions

template<unsigned dim, typename keyType >
keyType keyFromCoordinates (unsigned treeDepth, int coordinates[dim])
template<unsigned dim, typename keyType >
void coordinatesFromKey (keyType key, int *coordinates)
template<unsigned dim, typename keyType >
keyType parentKey (keyType key)
template<unsigned dim, typename keyType >
void brotherKeys (keyType key, keyType *result)
template<unsigned dim, typename keyType >
void childrenKeys (keyType key, keyType *result)

Detailed Description

Namespace grouping the functions specific to morton codes manipulation


Typedef Documentation

typedef unsigned bits::morton::hashKey

Function Documentation

template<unsigned dim, typename keyType >
void bits::morton::brotherKeys ( keyType  key,
keyType *  result 
) [inline]

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 dim, and bits::mask().

template<unsigned dim, typename keyType >
void bits::morton::childrenKeys ( keyType  key,
keyType *  result 
) [inline]

Computes the children keys of the key passed in parameter.

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

References dim, and bits::mask().

template<unsigned dim, typename keyType >
void bits::morton::coordinatesFromKey ( keyType  key,
int *  coordinates 
) [inline]

Computes the coordinates correspponding to a key

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

References dim.

template<unsigned dim, typename keyType >
keyType bits::morton::keyFromCoordinates ( unsigned  treeDepth,
int  coordinates[dim] 
) [inline]

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.
template<unsigned dim, typename keyType >
keyType bits::morton::parentKey ( keyType  key  )  [inline]

Returns the parent key of a key passed in parameter.

Parameters:
key The key.

References dim.

Generated on Fri Sep 10 10:33:58 2010 for DGtal by  doxygen 1.6.3