00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef APRIORI_H
00010 #define APRIORI_H
00011
00012 #include "Apriori_Trie.hpp"
00013 #include <map>
00014
00015
00078 class Apriori {
00079 public:
00080
00089 Apriori( ifstream& basket_file, const char* output_file_name,
00090 const bool store_input ):
00091 input_output_manager(basket_file, output_file_name ),
00092 store_input(store_input){}
00093
00095 void APRIORI_alg( const double min_supp,
00096 const bool quiet, const countertype size_threshold );
00097 ~Apriori(){delete apriori_trie;}
00098 private:
00099
00101 void support( const itemtype& candidate_size );
00102
00103 protected:
00104
00105
00106 private:
00108 Apriori_Trie* apriori_trie;
00109
00112 Input_Output_Manager input_output_manager;
00113
00115 map<vector<itemtype>, countertype> reduced_baskets;
00116
00119 bool store_input;
00120 };
00121
00122 #endif