vtf-logo

sfcIndex Class Reference

Implementation of space-filling curve. More...

#include <sfcIndex.h>

Inheritance diagram for sfcIndex:

BitVec PeanoHilbert List of all members.

Public Member Functions

sfcIndex const & operator= (sfcIndex const &other)
 Overload various operators for sfcIndex.
int sfcGetDigit (const int level) const
 Return the sfcIndexUnit (sfcdigitw bits) corresponding to level "level" of the sfc.
void sfcSetDigit (const int level, const int digit)
 Sets the sfcIndexUnit (sfcdigitw bits) corresponding to level "level" of the sfc using "digit.
void sfcUnsetDigit (const int level)
 Resets the sfcIndexUnit (sfcdigitw bits) corresponding to level "level" of the sfc.
void sfcMaxDigit (const int level)
 Set to all 1's the sfcIndexUnit (sfcdigitw bits) corresponding to level "level" of the sfc.
void sfcSwapDigitWd (const int level, const int pos1, const int pos2)
 Swaps sfcbasew bits at positions pos1 and pos2 in the sfcIndexUnit corresponding to level "level".
void sfcToggleDigitWd (const int level, const int pos)
 Toggles sfcbasew bits at pos in the sfcIndexUnit corresponding to level "level".
int sfcGetIndex () const
 Returns the (int) integer value of the index.
int sfcGetIndex (const int lev) const
 Returns the (int) integer value of the index at level lev; i.e.
int sfcGetIndex (const int lev, const int nlev) const
 Returns the (int) integer value of the index from level lev-nlev+1 to level lev.
void sfcSetIndex (const int index)
 Sets the (int) integer value of the sfcIndex to "index".
void sfcSetIndex (const int index, const int lev)
 Sets the (int) integer value of the sfcIndex at level lev (i.e.
void sfcSetIndex (const int index, const int lev, const int nlev)
 Sets the (int) integer value of the sfcIndex from lev to lev+nlev-1 to "index".
void sfcCreateLocNum (const int *coords)
 Create location numbers from given coordinates.
void sfcGetCoords (int *coords) const
 Returns an array of coordinates from the locations number.
void sfcGetDigitArray (int *digits) const
 Returns the sfcdigitw bits corresponding to each sfcIndexUnit as an array of int.
int sfcGetBaseW (void) const
 Query interface.

Detailed Description

Implementation of space-filling curve.

Class sfcIndex defines an index generated by the chosen SFC mapping i.e. specified space dimensions, base used and mapping function. sfcIndex is an ordering vector of sfcIndexUnits; each sfcIndexUnits defined as Dim Base-b digts, and defining the index at each level of the sfc. The most-significant sfcIndexUnits corresponds to level 1 Class sfcIndex is derived from BitVec.

Author:
Manish Parashar


Member Function Documentation

int sfcIndex::sfcGetDigit ( const int  level  )  const

Return the sfcIndexUnit (sfcdigitw bits) corresponding to level "level" of the sfc.

Remember that the most-significant sfcIndexUnit corresponds to level 1.

int sfcIndex::sfcGetIndex ( const int  lev  )  const

Returns the (int) integer value of the index at level lev; i.e.

only the first lev digits of the sfcIndex.

void sfcIndex::sfcSetIndex ( const int  index,
const int  lev 
)

Sets the (int) integer value of the sfcIndex at level lev (i.e.

MSB lev*sfcdigitw bits) to "index".

void sfcIndex::sfcSwapDigitWd ( const int  level,
const int  pos1,
const int  pos2 
)

Swaps sfcbasew bits at positions pos1 and pos2 in the sfcIndexUnit corresponding to level "level".

sfcIndexUnit bits are numbered from 0 with the MSB being 0.


The documentation for this class was generated from the following files:
Generated on Fri Aug 24 13:00:29 2007 for AMROC's Hierachical Data Structures - by  doxygen 1.4.7