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 ()
 sfcIndex (const int dim, const int levs, const int base=sfcBase)
 sfcIndex (sfcIndex const &other)
sfcIndex const & operator= (sfcIndex const &other)
 Overload various operators for sfcIndex.
int operator== (sfcIndex const &other) const
int operator!= (sfcIndex const &other) const
int operator> (sfcIndex const &other) const
int operator< (sfcIndex const &other) const
int operator>= (sfcIndex const &other) const
int operator<= (sfcIndex const &other) const
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 sfcMaxIndex (const int lev)
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.
int sfcGetDigitW (void) const

Protected Attributes

short int sfcbase
short int sfcdim
short int sfclevs

Friends

std::ostream & operator<< (std::ostream &, sfcIndex const &)

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

Constructor & Destructor Documentation

sfcIndex::sfcIndex (  )  [inline]
sfcIndex::sfcIndex ( const int  dim,
const int  levs,
const int  base = sfcBase 
) [inline]

References sfcdim.

sfcIndex::sfcIndex ( sfcIndex const &  other  )  [inline]

Member Function Documentation

int sfcIndex::operator!= ( sfcIndex const &  other  )  const

References sfcbase, sfcdim, and sfclevs.

int sfcIndex::operator< ( sfcIndex const &  other  )  const

References sfcbase, sfcdim, and sfclevs.

int sfcIndex::operator<= ( sfcIndex const &  other  )  const

References sfcbase, sfcdim, and sfclevs.

sfcIndex const & sfcIndex::operator= ( sfcIndex const &  other  ) 

Overload various operators for sfcIndex.

References sfcbase, sfcdim, and sfclevs.

int sfcIndex::operator== ( sfcIndex const &  other  )  const

References sfcbase, sfcdim, and sfclevs.

int sfcIndex::operator> ( sfcIndex const &  other  )  const

References sfcbase, sfcdim, and sfclevs.

int sfcIndex::operator>= ( sfcIndex const &  other  )  const

References sfcbase, sfcdim, and sfclevs.

void sfcIndex::sfcCreateLocNum ( const int *  coords  ) 

Create location numbers from given coordinates.

References BitVec::ResetVec(), sfcdim, and sfclevs.

Referenced by PeanoHilbert::Map().

int sfcIndex::sfcGetBaseW ( void   )  const [inline]

Query interface.

void sfcIndex::sfcGetCoords ( int *  coords  )  const

Returns an array of coordinates from the locations number.

References BitVec::IsolateBit(), sfcdim, and sfclevs.

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.

References BitVec::IsolateBit(), and sfclevs.

Referenced by PeanoHilbert::Map(), sfcGetDigitArray(), and sfcGetIndex().

void sfcIndex::sfcGetDigitArray ( int *  digits  )  const

Returns the sfcdigitw bits corresponding to each sfcIndexUnit as an array of int.

References sfcGetDigit(), and sfclevs.

int sfcIndex::sfcGetDigitW ( void   )  const [inline]
int sfcIndex::sfcGetIndex ( const int  lev,
const int  nlev 
) const

Returns the (int) integer value of the index from level lev-nlev+1 to level lev.

References BitVec::IsolateBit(), sfcbase, sfcdim, sfcGetDigit(), and sfclevs.

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.

References BitVec::IsolateBit(), sfcbase, sfcdim, sfcGetDigit(), and sfclevs.

int sfcIndex::sfcGetIndex (  )  const

Returns the (int) integer value of the index.

References BitVec::IsolateBit(), sfcbase, sfcdim, sfcGetDigit(), and sfclevs.

Referenced by operator<<().

void sfcIndex::sfcMaxDigit ( const int  level  ) 

Set to all 1's the sfcIndexUnit (sfcdigitw bits) corresponding to level "level" of the sfc.

References sfclevs.

Referenced by PeanoHilbert::GetBox(), PeanoHilbert::GetMax(), PeanoHilbert::SetBox(), PeanoHilbert::SetMax(), and sfcMaxIndex().

void sfcIndex::sfcMaxIndex ( const int  lev  ) 

References sfclevs, and sfcMaxDigit().

void sfcIndex::sfcSetDigit ( const int  level,
const int  digit 
)

Sets the sfcIndexUnit (sfcdigitw bits) corresponding to level "level" of the sfc using "digit.

References sfclevs.

Referenced by PeanoHilbert::GetBox(), PeanoHilbert::ResetBase(), PeanoHilbert::SetBox(), and sfcSetIndex().

void sfcIndex::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".

References sfclevs, and sfcSetDigit().

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".

References sfclevs, and sfcSetDigit().

void sfcIndex::sfcSetIndex ( const int  index  ) 

Sets the (int) integer value of the sfcIndex to "index".

References sfclevs, and sfcSetDigit().

Referenced by PeanoHilbert::Invert(), and PeanoHilbert::SetIndex().

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.

References sfcdim, sfclevs, and BitVec::SwapBit().

void sfcIndex::sfcToggleDigitWd ( const int  level,
const int  pos 
)

Toggles sfcbasew bits at pos in the sfcIndexUnit corresponding to level "level".

References sfclevs.

void sfcIndex::sfcUnsetDigit ( const int  level  ) 

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

References sfclevs.

Referenced by PeanoHilbert::SetBox(), and PeanoHilbert::SetMax().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
sfcIndex const &  si 
) [friend]

Member Data Documentation


The documentation for this class was generated from the following files:
Generated on Thu Jun 30 02:19:00 2016 for AMROC's Hierachical Data Structures by  doxygen 1.6.3