CAPD RedHom Library
EuclBitSetT< P_BitSet, dim > Class Template Reference

#include <capd/bitSet/EuclBitSetT.h>

Classes

class  BitCoordIterator
 
class  BitIterator
 
class  HypPlBitIterator
 
class  interval
 
class  NeighbIterator
 
class  NeighbSliceIterator
 
struct  Pixel
 
struct  PixelNeighborOffset
 
class  PointCoordIterator
 
class  PointIterator
 

Public Types

typedef P_BitSet::Word Word
 
typedef P_BitSet::WordIterator WordIterator
 
typedef bool(* selectorType) (const int *)
 
typedef P_BitSet BaseClass
 
typedef P_BitSet BitmapType
 
typedef const int * Point
 

Public Member Functions

void setupWidths ()
 
void setupStrides ()
 
 EuclBitSetT (int size=0, bool clear=false)
 
 EuclBitSetT (const int *w, bool clear=false)
 
 EuclBitSetT (const int *w, const char *bytes)
 
 EuclBitSetT (const EuclBitSetT &org, bool clear=false)
 
 EuclBitSetT (const EuclBitSetT &org, const Pixel &lc, const Pixel &uc)
 
 EuclBitSetT (const EuclBitSetT &org, const std::vector< int > &lc, const std::vector< int > &uc)
 
 EuclBitSetT (const RepSet< ElementaryCube > &A_RepSetOfElementaryCube)
 
const BaseClassgetBaseObject () const
 
int embDim () const
 
const int * Dimensions ()
 
const P_BitSetgetBitSet () const
 
unsigned long int getBmpSizeInBits ()
 
unsigned long int getBmpSizeInBytes ()
 
EuclBitSetT< P_BitSet, dim > & invert (bool trim=false)
 
BitIterator begin () const
 
BitIterator end () const
 
NeighbIterator neighbBegin (const BitIterator &it) const
 
NeighbIterator neighbEnd (const BitIterator &it) const
 
NeighbSliceIterator neighbSliceBegin (const BitIterator &it, int A_sliceDir, int A_sliceCoord) const
 
NeighbSliceIterator neighbSliceEnd (const BitIterator &it, int A_sliceDir, int A_sliceCoord) const
 
HypPlBitIterator hypPlBegin (int coords[]) const
 
EuclBitSetTwrap ()
 
EuclBitSetTpeel ()
 
int getPaddedWidth (int i) const
 
int getUnpaddedWidth (int i) const
 
EuclBitSetToperator= (const EuclBitSetT &A_EuclBitSet2)
 
void addPixel (const Pixel &p)
 
void removePixel (const Pixel &p)
 
bool containsPixel (const Pixel &p) const
 
void insert (const Point &p)
 
void remove (const Point &p)
 
bool contains (const Point &p) const
 
void addBox (const Pixel &lc, const Pixel &uc)
 
void addBoxBoundary (const Pixel &lc, const Pixel &uc)
 
template<typename Selector >
EuclBitSetTadd (const Selector &s, bool clear=false)
 
void readBmp (std::ifstream &file)
 
void readBmp (const char *fileName)
 
void writeBmp (const char *fileName, unsigned int A_type) const
 
bool findSomePoint (Pixel &p) const
 
bool midPoint (Pixel &p) const
 
bool contains (const Pixel &p) const
 
void clearHypPl (int coords[])
 
template<int dimF>
void clearFiber (const EuclBitSetT< P_BitSet, dimF > &A_fibSet)
 
bool isZeroHypPl (int coords[])
 
template<typename Selector >
EuclBitSetT< P_BitSet, dim > & add (const Selector &select, bool clear)
 
template<>
void writeBmp (const char *fileName, unsigned int A_type) const
 
template<>
void readBmp (std::ifstream &file)
 
template<>
void readBmp (const char *fileName)
 
template<>
void writeBmp (const char *fileName, unsigned int A_type) const
 
template<>
void readBmp (std::ifstream &file)
 
template<>
void readBmp (const char *fileName)
 

Public Attributes

int bitStride [dim]
 
int neighbStride [dim]
 
int neighbSliceStride [dim][dim]
 
int actualDimZeroBitWidth
 

Static Public Attributes

static const int theDim =dim
 

Protected Attributes

int paddedBitWidth [dim]
 
int wordWidth [dim]
 
int wordStride [dim]
 
int sumBitStrides
 

Static Protected Attributes

static const int bitsPerWord =sizeof(Word)*8
 
static const int neighbCubeInitPosition =(dim>=3 ? 0 : 9+3*(dim==1))
 

Friends

class BitIterator
 
class NeighbIterator
 
class NeighbSliceIterator
 
class PointCoordIterator
 
template<typename word2 , int dim2>
void showBmpCubSet (const EuclBitSetT< word2, dim2 > &set, int color, bool clear, bool rescale)
 
template<typename word2 , int dim2>
void showBmpCubSet (const EuclBitSetT< word2, dim2 > &set, int color, bool clear)
 
std::istream & operator>> (std::istream &in, EuclBitSetT< P_BitSet, dim > &A_BmpCubSet)
 
std::ostream & operator<< (std::ostream &out, const EuclBitSetT &A_BmpCubSet)
 
void swap (EuclBitSetT &A_BmpCubSet1, EuclBitSetT &A_BmpCubSet2)
 

Member Typedef Documentation

template<typename P_BitSet, int dim>
typedef P_BitSet EuclBitSetT< P_BitSet, dim >::BaseClass
template<typename P_BitSet, int dim>
typedef P_BitSet EuclBitSetT< P_BitSet, dim >::BitmapType
template<typename P_BitSet, int dim>
typedef const int* EuclBitSetT< P_BitSet, dim >::Point
template<typename P_BitSet, int dim>
typedef bool(* EuclBitSetT< P_BitSet, dim >::selectorType) (const int *)
template<typename P_BitSet, int dim>
typedef P_BitSet::Word EuclBitSetT< P_BitSet, dim >::Word
template<typename P_BitSet, int dim>
typedef P_BitSet::WordIterator EuclBitSetT< P_BitSet, dim >::WordIterator

Member Function Documentation

template<typename P_BitSet, int dim>
template<typename Selector >
EuclBitSetT& EuclBitSetT< P_BitSet, dim >::add ( const Selector &  s,
bool  clear = false 
)
template<typename P_BitSet, int dim>
BitIterator EuclBitSetT< P_BitSet, dim >::begin ( ) const
inline
template<typename P_BitSet, int dim>
template<int dimF>
void EuclBitSetT< P_BitSet, dim >::clearFiber ( const EuclBitSetT< P_BitSet, dimF > &  A_fibSet)
inline
template<typename P_BitSet, int dim>
void EuclBitSetT< P_BitSet, dim >::clearHypPl ( int  coords[])
inline
template<typename P_BitSet, int dim>
const int* EuclBitSetT< P_BitSet, dim >::Dimensions ( )
inline
template<typename P_BitSet, int dim>
int EuclBitSetT< P_BitSet, dim >::embDim ( ) const
inline
template<typename P_BitSet, int dim>
BitIterator EuclBitSetT< P_BitSet, dim >::end ( ) const
inline
template<typename P_BitSet, int dim>
const BaseClass& EuclBitSetT< P_BitSet, dim >::getBaseObject ( ) const
inline
template<typename P_BitSet, int dim>
const P_BitSet& EuclBitSetT< P_BitSet, dim >::getBitSet ( ) const
inline
template<typename P_BitSet, int dim>
unsigned long int EuclBitSetT< P_BitSet, dim >::getBmpSizeInBits ( )
inline
template<typename P_BitSet, int dim>
unsigned long int EuclBitSetT< P_BitSet, dim >::getBmpSizeInBytes ( )
inline
template<typename P_BitSet, int dim>
HypPlBitIterator EuclBitSetT< P_BitSet, dim >::hypPlBegin ( int  coords[]) const
inline
template<typename P_BitSet, int dim>
EuclBitSetT<P_BitSet,dim>& EuclBitSetT< P_BitSet, dim >::invert ( bool  trim = false)
inline
template<typename P_BitSet, int dim>
bool EuclBitSetT< P_BitSet, dim >::isZeroHypPl ( int  coords[])
inline
template<typename P_BitSet, int dim>
NeighbIterator EuclBitSetT< P_BitSet, dim >::neighbBegin ( const BitIterator it) const
inline
template<typename P_BitSet, int dim>
NeighbIterator EuclBitSetT< P_BitSet, dim >::neighbEnd ( const BitIterator it) const
inline
template<typename P_BitSet, int dim>
NeighbSliceIterator EuclBitSetT< P_BitSet, dim >::neighbSliceBegin ( const BitIterator it,
int  A_sliceDir,
int  A_sliceCoord 
) const
inline
template<typename P_BitSet, int dim>
NeighbSliceIterator EuclBitSetT< P_BitSet, dim >::neighbSliceEnd ( const BitIterator it,
int  A_sliceDir,
int  A_sliceCoord 
) const
inline
template<>
void EuclBitSetT< BitSetT< BitmapT< unsigned long int > >, 2 >::readBmp ( std::ifstream &  file)
template<>
void EuclBitSetT< BitSetT< BitmapT< unsigned long int > >, 2 >::readBmp ( const char *  fileName)
template<>
void EuclBitSetT< BitSetT< BitmapT< unsigned long int > >, 2 >::readBmp ( std::ifstream &  file)
template<>
void EuclBitSetT< BitSetT< BitmapT< unsigned long int > >, 2 >::readBmp ( const char *  fileName)
template<>
void EuclBitSetT< BitSetT< BitmapT< unsigned long int > >, 2 >::writeBmp ( const char *  fileName,
unsigned int  A_type 
) const
template<>
void EuclBitSetT< BitSetT< BitmapT< unsigned long int > >, 2 >::writeBmp ( const char *  fileName,
unsigned int  A_type 
) const

Friends And Related Function Documentation

template<typename P_BitSet, int dim>
friend class BitIterator
friend
template<typename P_BitSet, int dim>
friend class NeighbIterator
friend
template<typename P_BitSet, int dim>
friend class NeighbSliceIterator
friend
template<typename P_BitSet, int dim>
std::ostream& operator<< ( std::ostream &  out,
const EuclBitSetT< P_BitSet, dim > &  A_BmpCubSet 
)
friend
template<typename P_BitSet, int dim>
std::istream& operator>> ( std::istream &  in,
EuclBitSetT< P_BitSet, dim > &  A_BmpCubSet 
)
friend
template<typename P_BitSet, int dim>
friend class PointCoordIterator
friend
template<typename P_BitSet, int dim>
template<typename word2 , int dim2>
void showBmpCubSet ( const EuclBitSetT< word2, dim2 > &  set,
int  color,
bool  clear,
bool  rescale 
)
friend
template<typename P_BitSet, int dim>
template<typename word2 , int dim2>
void showBmpCubSet ( const EuclBitSetT< word2, dim2 > &  set,
int  color,
bool  clear 
)
friend
template<typename P_BitSet, int dim>
void swap ( EuclBitSetT< P_BitSet, dim > &  A_BmpCubSet1,
EuclBitSetT< P_BitSet, dim > &  A_BmpCubSet2 
)
friend

Member Data Documentation

template<typename P_BitSet, int dim>
int EuclBitSetT< P_BitSet, dim >::actualDimZeroBitWidth
template<typename P_BitSet, int dim>
const int EuclBitSetT< P_BitSet, dim >::bitsPerWord =sizeof(Word)*8
staticprotected
template<typename P_BitSet, int dim>
int EuclBitSetT< P_BitSet, dim >::bitStride[dim]
template<typename P_BitSet, int dim>
const int EuclBitSetT< P_BitSet, dim >::neighbCubeInitPosition =(dim>=3 ? 0 : 9+3*(dim==1))
staticprotected
template<typename P_BitSet, int dim>
int EuclBitSetT< P_BitSet, dim >::neighbSliceStride[dim][dim]
template<typename P_BitSet, int dim>
int EuclBitSetT< P_BitSet, dim >::neighbStride[dim]
template<typename P_BitSet, int dim>
int EuclBitSetT< P_BitSet, dim >::paddedBitWidth[dim]
protected
template<typename P_BitSet, int dim>
int EuclBitSetT< P_BitSet, dim >::sumBitStrides
protected
template<typename P_BitSet, int dim>
const int EuclBitSetT< P_BitSet, dim >::theDim =dim
static
template<typename P_BitSet, int dim>
int EuclBitSetT< P_BitSet, dim >::wordStride[dim]
protected
template<typename P_BitSet, int dim>
int EuclBitSetT< P_BitSet, dim >::wordWidth[dim]
protected