SparseLibrary  Version 1.6.0
Static Public Member Functions | Static Protected Attributes | List of all members
Matrix2HilbertCoordinates Class Reference

Class which maps coordinates to 1D Hilbert Coordinates. More...

#include <Matrix2HilbertCoordinates.hpp>

Static Public Member Functions

static void IntegerToHilbert (const size_t i, const size_t j, size_t &h1, size_t &h2)
 New method, October 2010. More...
 

Static Protected Attributes

static const unsigned char BITWIDTH = 8 * sizeof(size_t)
 The amount of bits in a native data word. More...
 

Detailed Description

Class which maps coordinates to 1D Hilbert Coordinates.

Member Function Documentation

void Matrix2HilbertCoordinates::IntegerToHilbert ( const size_t  i,
const size_t  j,
size_t &  h1,
size_t &  h2 
)
static

New method, October 2010.

Maps any 2D coordinate (i,j), with i and j size_t values of length x bits (machine- dependent), to a 1D coordinate of length 2*x bits. The 2*x bits 1D coordinate is returned as two size_t values h1 and h2, where h1 stores the most significant part of the 1D coordinate. If both i and j can be stored in half or less the amount of bits of a size_t integer, then h1 will be 0.

Parameters
iA size_t integer value in one dimension
jA size_t integer value in the other dimension
h1First part of the 1D Hilbert coordinate, unsigned integer format (most significant, first 64 bits)
h2Second part of the 1D Hilbert coordinate (least significant, last 64 bits)

Maps any 2D coordinate (i,j), with i and j 64-bits unsigned integers, to a 1D 128-bits unsigned integer.

Parameters
iA 64-bits unsigned integer value in one dimension
jA 64-bits unsigned integer value in the other dimension
h1First part of the 128-bit Hilbert coordinate, unsigned integer format (most significant, first 64 bits)
h2Second part of the 128-bit Hilbert coordinate (least significant, last 64 bits)

References BITWIDTH.

Referenced by HilbertTriplet< T >::calculateHilbertCoordinate(), CompressedHilbert< T >::load(), BetaHilbert< T >::thread(), RDBHilbert< T, MatrixType >::thread(), and HilbertArray< T, I, hI, mI >::zax().

Member Data Documentation

const unsigned char Matrix2HilbertCoordinates::BITWIDTH = 8 * sizeof(size_t)
staticprotected

The amount of bits in a native data word.

Referenced by IntegerToHilbert().


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