#include <mset_vat.h>
Public Types | |
typedef pattern_support< V_Fkk_MINE_PROP > | PAT_SUP |
typedef vat< MSET_PROP, V_Fkk_MINE_PROP, ALLOC, ST > | VAT |
typedef ST< pair< int, int >, ALLOC< pair< int, int > > > | IDLIST_T |
typedef IDLIST_T::const_iterator | CONST_IT |
typedef IDLIST_T::iterator | IT |
Public Member Functions | |
void * | operator new (size_t size) |
void | operator delete (void *p, size_t size) |
IT | begin () |
CONST_IT | begin () const |
IT | end () |
CONST_IT | end () const |
bool | empty () const |
int | size () |
void | make_empty () |
void | push_back (const pair< int, int > &val) |
pair< int, int > & | operator[] (int n) |
void | resize (int x) |
void | clear () |
unsigned long | size () const |
Return Vat length. | |
vat (const VAT &orig) | |
const VAT & | operator= (const VAT &right) |
unsigned long int | byte_size () const |
Static Public Member Functions | |
template<class PAT> | |
static VAT ** | intersection (const VAT *const &vat_i, const VAT *const &vat_j, PAT_SUP **cand_sups, PAT **, bool &is_l2) |
Vat Intersection for Itemset patterns. | |
Friends | |
ostream & | operator<< (ostream &, const VAT &) |
istream & | operator>> (istream &, VAT &) |
In this partial specialization, PP is fixed to no_edges (itemset property), MP is fixed to Fk X Fk and vert_mine (vertical mining with Fk X Fk), ST is the storage type, what needs a base type information, here templatized with P
vat< MSET_PROP, V_Fkk_MINE_PROP, ALLOC, ST >::vat | ( | const VAT & | orig | ) | [inline] |
read from a file
static VAT** vat< MSET_PROP, V_Fkk_MINE_PROP, ALLOC, ST >::intersection | ( | const VAT *const & | vat_i, | |
const VAT *const & | vat_j, | |||
PAT_SUP ** | cand_sups, | |||
PAT ** | , | |||
bool & | is_l2 | |||
) | [inline, static] |
Vat Intersection for Itemset patterns.
[in] | vat_i | A pointer to the VAT corresponding to the first pattern. |
[in] | vat_j | A pointer to the VAT corresponding to the second pattern. |
[out] | cand_sup | An array of pointers to pattern_support class instances that is modified in this routine to hold actual support value. |
[in] | is_l2 | A boolean to designate whether current VAT intersection is a Level 2 vat_join. |
const VAT& vat< MSET_PROP, V_Fkk_MINE_PROP, ALLOC, ST >::operator= | ( | const VAT & | right | ) | [inline] |
Overloaded = operator; avoids self assignment.
pair<int, int>& vat< MSET_PROP, V_Fkk_MINE_PROP, ALLOC, ST >::operator[] | ( | int | n | ) | [inline] |
Creating an array operator to work over VAT
void vat< MSET_PROP, V_Fkk_MINE_PROP, ALLOC, ST >::push_back | ( | const pair< int, int > & | val | ) | [inline] |
Appends new entry into vat
void vat< MSET_PROP, V_Fkk_MINE_PROP, ALLOC, ST >::resize | ( | int | x | ) | [inline] |
Resizes the vector
ostream& operator<< | ( | ostream & | , | |
const VAT & | ||||
) | [friend] |
Serialize an Itemset Vat to an Output stream void write_file(ostream & output) const { cout<<"writing this:"<<*this; CONST_IT iter; iter =_idlist.begin(); for (;iter!=_idlist.end();iter++){ output.write( reinterpret_cast<const char *>( & (*iter) ), sizeof(T)); output.write( reinterpret_cast<const char *>( & (*iter) ), sizeof(int)); } } // //end write_file
De-Serialize an Itemset Vat from an Input stream void read_file (istream & input, unsigned long int size) { TODO: This should be the element type in the vat. int temp; unsigned long int i; unsigned long int j=size/sizeof(T); unsigned long int j=size/sizeof(int); _idlist.clear(); for ( i=0;i<j;i++){ input.read(reinterpret_cast<char *>( & (temp) ), sizeof(T)); input.read(reinterpret_cast<char *>( & (temp) ), sizeof(int)); _idlist.push_back(temp); } }