Main Page | Namespace List | Class List | File List | Class Members | File Members

Input_Output_Manager.hpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           Input_Output_Manager.hpp  -  description
00003                              -------------------
00004     begin                : cs march 10 2004
00005     copyright            : (C) 2004 by Ferenc Bodon
00006     email                : bodon@cs.bme.hu
00007  ***************************************************************************/
00008 
00009 #ifndef Input_Output_Manager_HPP
00010 #define Input_Output_Manager_HPP
00011 
00016 #include "common.hpp"  
00017 #include <fstream>
00018 #include <vector>
00019 #include <set>
00020 using namespace std;
00021 
00022 
00032 class Input_Output_Manager:public ofstream
00033 {
00034 public:
00035 
00036       Input_Output_Manager( ifstream& basket_file,  const char* output_file_name );
00037    
00039       int read_in_a_line( set<itemtype>& basket );
00040 
00042       unsigned long find_frequent_items( ifstream& mis_file,
00043                           set< pair<itemtype, unsigned long> >& support_of_items, 
00044                                          vector<double>& mis_abs);
00045 
00047       void basket_recode( const set<itemtype>& original_basket, vector<itemtype>& new_basket );
00048 
00050       void write_out_basket( const set<itemtype>& itemset );
00051 
00053       void write_out_basket_and_counter( const set<itemtype>& itemset, const unsigned long counter );
00054 
00056       void rewind(); 
00057 
00058       ~Input_Output_Manager( );
00059 
00060 private:
00062    ifstream& basket_file;
00063    
00069    vector<itemtype> new_code;
00070 
00075    vector<itemtype> new_code_inverse;
00076 };
00077 
00078 
00079 #endif

Generated on Sun Jun 20 23:41:08 2004 for APRIORI algorithm by doxygen 1.3.5