00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef APRIORI_H
00010 #define APRIORI_H
00011
00012 #include "Trie.hpp"
00013 #include "Trie_hash.hpp"
00014 #include <map>
00015
00016
00070 class Apriori {
00071 public:
00072 Apriori( const bool& quiet, const bool& store_input, const int& trie_type=1, const int& child_threshold = 5 );
00073
00075 void APRIORI_alg( ofstream& outcomefile, const char* basket_filename, const double& min_supp, const double& min_conf );
00076
00077 private:
00078
00080 void read_in_a_line( FILE* filepoint );
00082 void support( FILE* filepoint, const itemtype& candidate_size );
00083
00084 Trie* trie;
00085 vector<itemtype> basket;
00086 unsigned long basket_number;
00087 map<vector<itemtype>, unsigned long> reduced_baskets;
00088 bool quiet;
00089 bool store_input;
00090 };
00091
00092 #endif