#include <db_reader.h>
Public Types | |
typedef vat< typename PATTERN::PAT_PROPS, typename PATTERN::MINE_PROPS, ALLOC, std::vector > | VAT |
typedef tokenizer< PATTERN, TOKENIZER, ALLOC > | TKNZ |
vat typedef | |
Public Member Functions | |
db_reader (const char *infile_name) | |
tokenizer class for this pattern-type, its method parse_next_line() is invoked by db_reader Constructor | |
db_reader (const char *infile_name, int mem_size) | |
Constructor_for_gigabase. | |
~db_reader () | |
destructor | |
void | open (const char *infile_name) |
Opens the specified input file. This is an alternative to the parameterized constructor. | |
void | close () |
Closes the file associated with this class. | |
bool | is_open () |
returns whether file associated with this object is open | |
template<class SM_T> | |
void | get_length_one (pat_fam< PATTERN > &freq_pats, storage_manager< PATTERN, VAT, ALLOC, SM_T > &vat_hmap, const int &minsup) |
obtain length one frequent patterns in sorted order, and populate vat_db with their vats |
This class reads the database, using the tokenizer class and populate the level-1 VAT.
db_reader< PATTERN, TOKENIZER, ALLOC >::db_reader | ( | const char * | infile_name | ) | [inline] |
tokenizer class for this pattern-type, its method parse_next_line() is invoked by db_reader Constructor
infile_name | Name of the input database (flat) file |
db_reader< PATTERN, TOKENIZER, ALLOC >::db_reader | ( | const char * | infile_name, | |
int | mem_size | |||
) | [inline] |
Constructor_for_gigabase.
infile_name | Name of the input database (flat) file. | |
mem_size | Maximum size of memory vat for gigabase backend. |
void db_reader< PATTERN, TOKENIZER, ALLOC >::close | ( | ) | [inline] |
Closes the file associated with this class.
void close()
void db_reader< PATTERN, TOKENIZER, ALLOC >::get_length_one | ( | pat_fam< PATTERN > & | freq_pats, | |
storage_manager< PATTERN, VAT, ALLOC, SM_T > & | vat_hmap, | |||
const int & | minsup | |||
) | [inline] |
obtain length one frequent patterns in sorted order, and populate vat_db with their vats
void get_length_one(pat_fam<PATTERN>& freq_pats, vat_db<PATTERN, VAT,0>& vat_hmap, int minsup)
freq_pats | Pattern Family which is populated with the frequent patterns | |
vat_hmap | The hashmap used to store pattern-to-VAT mappings | |
minsup | Minimum support threshold |
bool db_reader< PATTERN, TOKENIZER, ALLOC >::is_open | ( | ) | [inline] |
returns whether file associated with this object is open
bool is_open
void db_reader< PATTERN, TOKENIZER, ALLOC >::open | ( | const char * | infile_name | ) | [inline] |
Opens the specified input file. This is an alternative to the parameterized constructor.
infile_name | Name of the input file |