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

Input/Output Functions

Reading the data in and building the item bitmaps. More...

Data Structures

class  InputData
 Class for reading transactions from an ASCII file. More...

class  ItemsetOutput
 Output itemsets to a file. More...

class  Transaction
 Transaction (itemlist) from a database. More...


Functions

void AddToF1 (TreeNode *newNode)
 Insert pointer to node in order of increasing support.

void F1UsingProb (double P)
 Create bitmaps filled randomly with probability p.

void F1FromFile (char *filename, bool isAsciiFile)
 Read transaction data from file and build item bitmaps.

void PrintMFI ()
 To print the MFI data out to an ASCII file with each entry having the format: [list of items in MFI entry...] [(support)].

 ItemsetOutput (char *filename)
 Open file for outputting itemsets.

 ~ItemsetOutput ()
 Close file output stream.

int isOpen ()
 Check if file is open.

void printSet (int length, int *iset, int support=-1)
 Print out an itemset.

TransactiongetNextTransaction ()
 Get next transaction from the input file.

 InputData (char *filename, int *ITEMBUFFER, bool IS_ASCII)
 Open the input file.

 ~InputData ()
 Close the input file.

int isOpen ()
 Check if the input file is open.


Detailed Description

Reading the data in and building the item bitmaps.

Outputting the frequent itemsets.


Function Documentation

void AddToF1 TreeNode   newNode
 

Insert pointer to node in order of increasing support.

Parameters:
newNode  item node to add to F1

Definition at line 200 of file Mafia.cpp.

Referenced by F1FromFile(), and F1UsingProb().

void F1FromFile char *    filename,
bool    isAsciiFile
 

Read transaction data from file and build item bitmaps.

If the data is in ascii form: [itemid_1] [itemid_2] ... [itemid_n] If the data is in binary form: [custid] [transid] [number of items] [itemid_1] [itemid_2] ... [itemid_n]

Parameters:
filename  name of file to be read in
isAsciiFile  true for ASCII input, false for binary

Definition at line 254 of file Mafia.cpp.

void F1UsingProb double    P
 

Create bitmaps filled randomly with probability p.

Parameters:
P  - probability of a bit p being set

Definition at line 224 of file Mafia.cpp.

Transaction * InputData::getNextTransaction   [inherited]
 

Get next transaction from the input file.

Returns:
pointer to a new Transaction

Definition at line 52 of file Transaction.cpp.

Referenced by F1FromFile().

InputData::InputData char *    filename,
int *    ITEMBUFFER,
bool    IS_ASCII
[inherited]
 

Open the input file.

Parameters:
filename  input filename
ITEMBUFFER  pointer to buffer for storing a transaction
IS_ASCII  true if file is in ASCII format

Definition at line 123 of file Transaction.cpp.

int InputData::isOpen   [inherited]
 

Check if the input file is open.

Returns:
true if file is open

Definition at line 145 of file Transaction.cpp.

Referenced by F1FromFile().

int ItemsetOutput::isOpen   [inherited]
 

Check if file is open.

Returns:
true if file is open

Definition at line 67 of file ItemsetOutput.cpp.

Referenced by PrintMFI().

ItemsetOutput::ItemsetOutput char *    filename [inherited]
 

Open file for outputting itemsets.

Parameters:
filename  filename for output

Definition at line 50 of file ItemsetOutput.cpp.

void PrintMFI  
 

To print the MFI data out to an ASCII file with each entry having the format: [list of items in MFI entry...] [(support)].

Definition at line 371 of file Mafia.cpp.

void ItemsetOutput::printSet int    length,
int *    itemset,
int    support = -1
[inherited]
 

Print out an itemset.

Parameters:
length  number of items in itemset
itemset  array of items
support  support of itemset (-1 to suppress)

Definition at line 81 of file ItemsetOutput.cpp.

Referenced by AddToFI(), and PrintMFI().

InputData::~InputData   [inherited]
 

Close the input file.

Definition at line 136 of file Transaction.cpp.

ItemsetOutput::~ItemsetOutput   [inherited]
 

Close file output stream.

Definition at line 57 of file ItemsetOutput.cpp.


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