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

Bitmap processing

Classes and methods for storing and processing bitmaps. More...

Data Structures

class  BaseBitmap
 A simple bitmap class with only uncompressed data for name bitmaps. More...

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


Defines

#define BYTE_COUNT   (sizeof(unsigned int) / sizeof(unsigned char))

Functions

 BaseBitmap (int numBits)
 Allocate the memory for the BaseBitmap.

 BaseBitmap (BaseBitmap &)
 Copy constructor.

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

void FillOnes ()
 Fill the BaseBitmap with ones.

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

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.

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

 Bitmap (Bitmap &)
 Copy constructor.

 ~Bitmap ()
 Deallocate memory for the Bitmap.

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

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

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

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

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.


Detailed Description

Classes and methods for storing and processing bitmaps.


Define Documentation

#define BYTE_COUNT   (sizeof(unsigned int) / sizeof(unsigned char))
 

Definition at line 46 of file BaseBitmap.cpp.


Function Documentation

void Bitmap::AndCompOnly const Bitmap &    B1,
const Bitmap &    B2,
int &    CountSmallAnds
[inherited]
 

Bitwise AND 2 compressed bitmaps and store the result.

Parameters:
B1  first bitmap
B2  second bitmap
CountSmallAnds  [output] counter of ANDs on compressed data

Definition at line 154 of file Bitmap.cpp.

Referenced by MAFIA(), and ReorderTail().

void BaseBitmap::AndOnly const BaseBitmap &    B1,
const BaseBitmap &    B2,
int &    CountAnds
[inherited]
 

Bitwise AND 2 bitmaps and store the result.

Parameters:
B1  the first Bitmap
B2  the second Bitmap
CountAnds  [output] counter for # of ANDs (for debugging)

Definition at line 167 of file BaseBitmap.cpp.

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

BaseBitmap::BaseBitmap BaseBitmap &    bitmapToCopy [explicit, inherited]
 

Copy constructor.

Parameters:
bitmapToCopy  BaseBitmap to copy

Definition at line 69 of file BaseBitmap.cpp.

BaseBitmap::BaseBitmap int    numBits [explicit, inherited]
 

Allocate the memory for the BaseBitmap.

Parameters:
numBits  number of bits in the BaseBitmap

Definition at line 53 of file BaseBitmap.cpp.

Bitmap::Bitmap Bitmap &    b [explicit, inherited]
 

Copy constructor.

Parameters:
b  bitmap to copy

Definition at line 82 of file Bitmap.cpp.

Bitmap::Bitmap int    numBits [explicit, inherited]
 

Allocate the memory for the bitmap.

Parameters:
numBits  number of bits in the Bitmap

Definition at line 57 of file Bitmap.cpp.

void Bitmap::BuildRelComp Bitmap &    source [inherited]
 

Compress this bitmap relative to the source - has a bit for each trans in source.

Parameters:
source  the bitmap you are compressing relative to

Definition at line 211 of file Bitmap.cpp.

void Bitmap::BuildSource   [inherited]
 

Fill the compressed bitmap with ones.

Definition at line 267 of file Bitmap.cpp.

Referenced by MAFIA().

int BaseBitmap::Count int &    CountCounts [inherited]
 

Count the ones in the bitmap.

Parameters:
CountCounts  a counter of counts (for debugging)
Returns:
the count of ones

Definition at line 113 of file BaseBitmap.cpp.

void Bitmap::FillCompEmptyPosition int    j [inherited]
 

Fill in a 1 in a certain position in COMPRESSED data.

Parameters:
j  bit position in Bitmap to be changed

Definition at line 111 of file Bitmap.cpp.

void BaseBitmap::FillOnes   [inherited]
 

Fill the BaseBitmap with ones.

Definition at line 102 of file BaseBitmap.cpp.

Referenced by MergeRepeatedItemsets().

void BaseBitmap::FillRand double    prob [inherited]
 

Fill the BaseBitmap with random data.

Parameters:
prob  probability of a bit being set to 1

Definition at line 84 of file BaseBitmap.cpp.

Referenced by F1UsingProb().

void Bitmap::NotAndCompOnly const Bitmap &    B1,
const Bitmap &    B2,
int &    CountSmallAnds
[inherited]
 

Bitwise AND 2 compressed bitmaps and the negation and store the result.

Parameters:
B1  first bitmap
B2  second bitmap
CountSmallAnds  [output] counter of ANDs on compressed data

Definition at line 183 of file Bitmap.cpp.

void BaseBitmap::NotAndOnly const BaseBitmap &    B1,
const BaseBitmap &    B2,
int &    CountAnds
[inherited]
 

Bitwise AND 2 bitmaps and the negation and store the result.

Parameters:
B1  the first Bitmap
B2  the second Bitmap
CountAnds  [output] counter for # of ANDs (for debugging)

Definition at line 195 of file BaseBitmap.cpp.

void BaseBitmap::Or const BaseBitmap &    B1,
const BaseBitmap &    B2
[inherited]
 

Bitwise OR 2 bitmaps and store the result.

Parameters:
B1  the first Bitmap
B2  the second Bitmap

Definition at line 143 of file BaseBitmap.cpp.

Referenced by MAFIA(), and ReorderTail().

int Bitmap::SmallCount int &    CountCounts [inherited]
 

Count the number of ones in the Compressed bitmap.

Returns:
the count of ones in the bitmap

Definition at line 124 of file Bitmap.cpp.

Referenced by MAFIA(), and ReorderTail().

bool BaseBitmap::Superset const BaseBitmap *    subset [inherited]
 

Determine whether this bitmap is a superset of the parameter.

NOTE: Assumes the set of bitmaps is lexicographically ordered.

Parameters:
subset  bitmap to check for a superset relation
Returns:
True if this bitmap is a superset of the parameter bitmap (this bitmap has a 1 in ALL positions that parameter bitmap does )

Definition at line 225 of file BaseBitmap.cpp.

bool BaseBitmap::SupersetEq const BaseBitmap *    subset [inherited]
 

Determine whether this bitmap is a superset of the parameter or equal to it.

Parameters:
subset  bitmap to check for a superseteq relation
Returns:
True if this bitmap is a superset of the parameter bitmap (this bitmap has a 1 in ALL positions that parameter bitmap does )

Definition at line 262 of file BaseBitmap.cpp.

Bitmap::~Bitmap   [inherited]
 

Deallocate memory for the Bitmap.

Definition at line 102 of file Bitmap.cpp.


Generated on Thu Dec 4 15:22:07 2003 for MAFIA by doxygen1.2.18