Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

Bitmap Class Reference
[Bitmap processing]

This bitmap has compressed and uncompressed data. More...

#include <Bitmap.h>

Inheritance diagram for Bitmap:

Inheritance graph
[legend]
Collaboration diagram for Bitmap:

Collaboration graph
[legend]

Public Methods

 Bitmap (int numBits)
 Allocate the memory for the bitmap.

 Bitmap (Bitmap &)
 Copy constructor.

 ~Bitmap ()
 Deallocate memory for the Bitmap.

int SmallCount (int &CountCounts)
 Count the number of ones in the Compressed bitmap.

void FillCompEmptyPosition (int j)
 Fill in a 1 in a certain position in COMPRESSED data.

void BuildRelComp (Bitmap &source)
 Compress this bitmap relative to the source - has a bit for each trans in source.

void BuildSource ()
 Fill the compressed bitmap with ones.

void NotAndCompOnly (const Bitmap &B1, const Bitmap &B2, int &CountSmallAnds)
 Bitwise AND 2 compressed bitmaps and the negation and store the result.

void AndCompOnly (const Bitmap &b1, const Bitmap &b2, int &CountAnds)
 Bitwise AND 2 compressed bitmaps and store the result.

int Count (int &CountCounts)
 Count the ones in the bitmap.

void FillRand (double prob)
 Fill the BaseBitmap with random data.

void FillOnes ()
 Fill the BaseBitmap with ones.

void Or (const BaseBitmap &b1, const BaseBitmap &b2)
 Bitwise OR 2 bitmaps and store the result.

void AndOnly (const BaseBitmap &b1, const BaseBitmap &b2, int &CountAnds)
 Bitwise AND 2 bitmaps and store the result.

void NotAndOnly (const BaseBitmap &b1, const BaseBitmap &b2, int &CountAnds)
 Bitwise AND 2 bitmaps and the negation and store the result.

bool Superset (const BaseBitmap *subset)
 Determine whether this bitmap is a superset of the parameter.

bool SupersetEq (const BaseBitmap *subset)
 Determine whether this bitmap is a superset of the parameter or equal to it.

unsigned int CheckPosition (int bitIndex, int &CountCheckPosition)
 Check position of bit.

unsigned int CheckPosition (int bitIndex)
 Check position of bit.

void FillEmptyPosition (int bitIndex)
 Fill in a 1 in a certain position.


Data Fields

int _compSize
 in number of INTs

int _compUsed
 in number of INTs

unsigned int * _compMemory
 where COMPRESSED data stored

int _size
 in number of INTs

int _count
 the number of ones in the BaseBitmap

unsigned int * _memory
 where uncompressed data is stored


Friends

class Count

Detailed Description

This bitmap has compressed and uncompressed data.

Note: Transaction bitmaps are of this type

Definition at line 57 of file Bitmap.h.


Member Function Documentation

unsigned int BaseBitmap::CheckPosition int    bitIndex [inline, inherited]
 

Check position of bit.

Parameters:
bitIndex  bit position in BaseBitmap to be checked
Returns:
0 if bit is 0, 1 otherwise

Definition at line 108 of file BaseBitmap.h.

unsigned int BaseBitmap::CheckPosition int    bitIndex,
int &    CountCheckPosition
[inline, inherited]
 

Check position of bit.

Parameters:
CountCheckPosition  # of times this function is called
bitIndex  bit position in BaseBitmap to be checked
Returns:
0 if bit is 0, 1 otherwise

Definition at line 97 of file BaseBitmap.h.

Referenced by AddToFI().

void BaseBitmap::FillEmptyPosition int    bitIndex [inline, inherited]
 

Fill in a 1 in a certain position.

Parameters:
bitIndex  bit position in BaseBitmap to be changed

Definition at line 117 of file BaseBitmap.h.


Friends And Related Function Documentation

friend class Count [friend]
 

Reimplemented from BaseBitmap.

Definition at line 61 of file Bitmap.h.

Referenced by F1UsingProb(), MAFIA(), MergeRepeatedItemsets(), and ReorderTail().


Field Documentation

unsigned int* Bitmap::_compMemory
 

where COMPRESSED data stored

Definition at line 77 of file Bitmap.h.

Referenced by AndCompOnly(), Bitmap(), BuildRelComp(), BuildSource(), FillCompEmptyPosition(), NotAndCompOnly(), SmallCount(), and ~Bitmap().

int Bitmap::_compSize
 

in number of INTs

Definition at line 74 of file Bitmap.h.

Referenced by Bitmap().

int Bitmap::_compUsed
 

in number of INTs

Definition at line 75 of file Bitmap.h.

Referenced by AndCompOnly(), Bitmap(), BuildRelComp(), BuildSource(), NotAndCompOnly(), and SmallCount().

int BaseBitmap::_count [inherited]
 

the number of ones in the BaseBitmap

Definition at line 87 of file BaseBitmap.h.

Referenced by AddToF1(), AddToFCI(), AddToFI(), AddToMFI(), BaseBitmap::BaseBitmap(), Bitmap(), BuildSource(), BaseBitmap::Count(), F1FromFile(), MAFIA(), MergeRepeatedItemsets(), BaseBitmap::Or(), ReorderTail(), SmallCount(), BaseBitmap::Superset(), and BaseBitmap::SupersetEq().

unsigned int* BaseBitmap::_memory [inherited]
 

where uncompressed data is stored

Definition at line 88 of file BaseBitmap.h.

Referenced by BaseBitmap::AndOnly(), BaseBitmap::BaseBitmap(), Bitmap(), BuildRelComp(), BaseBitmap::CheckPosition(), BaseBitmap::Count(), BaseBitmap::FillEmptyPosition(), BaseBitmap::FillOnes(), BaseBitmap::FillRand(), BaseBitmap::NotAndOnly(), BaseBitmap::Or(), BaseBitmap::Superset(), BaseBitmap::SupersetEq(), and BaseBitmap::~BaseBitmap().

int BaseBitmap::_size [inherited]
 

in number of INTs

Definition at line 86 of file BaseBitmap.h.

Referenced by BaseBitmap::AndOnly(), BaseBitmap::BaseBitmap(), Bitmap(), BuildRelComp(), BaseBitmap::Count(), BaseBitmap::FillOnes(), BaseBitmap::FillRand(), BaseBitmap::NotAndOnly(), BaseBitmap::Or(), BaseBitmap::Superset(), and BaseBitmap::SupersetEq().


The documentation for this class was generated from the following files:
Generated on Thu Dec 4 15:22:07 2003 for MAFIA by doxygen1.2.18