00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef TRIE_HASH_H
00010 #define TRIE_HASH_H
00011
00012 #include "trie.h"
00013
00014
00019 class Trie_hash : public Trie {
00025 vector<bool> type_vector;
00027 itemtype child_threshold;
00032 itemtype hash_modulus;
00033
00035
00038 void from_hash_to_normal(const unsigned long state_index);
00039
00041
00044 void from_normal_to_hash(const unsigned long state_index);
00045
00046 void delete_edge(const unsigned long from_state,const unsigned long to_state);
00047 void max_path_set(const unsigned long state_index);
00048 void add_empty_state(const unsigned long from_state, const itemtype item,const unsigned long counter);
00049 unsigned long is_included(const set<itemtype>& an_itemset) const;
00050 void delete_infrequent_one(const unsigned long min_occurrence);
00051 void delete_infrequent_two(const unsigned long min_occurrence);
00052 void delete_infrequent_more(const unsigned long min_occurrence);
00053 void candidate_generation_assist(unsigned long actual_state,const itemtype frequent_size,const itemtype actual_size,set<itemtype>& maybe_candidate);
00054 void find_candidate_more(const vector<itemtype>& basket,const itemtype candidate_size,vector<itemtype>::const_iterator it_basket,const unsigned long actual_state,const itemtype actual_size, const unsigned long counter=1);
00055 void assoc_rule_assist(ofstream& outcomefile,const double min_conf,unsigned long actual_state, set<itemtype>& consequence_part) const;
00056 void write_content_to_file_assist(ofstream& outcomefile,const unsigned long actual_state,const itemtype item_size,const itemtype actual_size,set<itemtype>& frequent_itemset) const;
00057 public:
00058 Trie_hash(const itemtype child_threshold_in=5);
00059 void statistics() const;
00060 void show_content() const;
00061 };
00062
00063 #endif