00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef TRIE_HASH_H
00010 #define TRIE_HASH_H
00011
00012 #include "Trie.hpp"
00013
00014
00019 class Trie_hash : public Trie
00020 {
00021 public:
00022
00023 Trie_hash( const itemtype child_threshold_in=5 );
00024 void statistics() const;
00025 void show_content() const;
00026
00027 private:
00028
00030 void from_hash_to_normal( const unsigned long state_index );
00031
00033 void from_normal_to_hash( const unsigned long state_index );
00034
00035 void delete_edge( const unsigned long to_state );
00036 void max_path_set( const unsigned long state_index );
00037 void add_empty_state( const unsigned long from_state, const itemtype item, const unsigned long counter );
00038 unsigned long is_included( const set<itemtype>& an_itemset ) const;
00039 void delete_infrequent_one( const unsigned long min_occurrence );
00040 void delete_infrequent_two( const unsigned long min_occurrence );
00041 void delete_infrequent_more( const unsigned long min_occurrence );
00042 void candidate_generation_assist( unsigned long actual_state,const itemtype distance_from_generator,
00043 set<itemtype>& maybe_candidate );
00044 void find_candidate_more( const vector<itemtype>& basket, const itemtype distance_from_candidate,
00045 vector<itemtype>::const_iterator it_basket, const unsigned long actual_state,
00046 const unsigned long counter=1 );
00047 void assoc_rule_assist( ofstream& outcomefile,const double min_conf, unsigned long actual_state, set<itemtype>& consequence_part ) const;
00048 void write_content_to_file_assist( ofstream& outcomefile, const unsigned long actual_state,
00049 const itemtype distance_from_frequent, set<itemtype>& frequent_itemset ) const;
00050
00056 vector<bool> type_vector;
00057
00059 itemtype child_threshold;
00060
00065 itemtype hash_modulus;
00066
00067
00068 };
00069
00070 #endif