input_output_manager.hpp
来自「数据挖掘的算法」· HPP 代码 · 共 47 行
HPP
47 行
#ifndef Input_Output_Manager_HPP
#define Input_Output_Manager_HPP
#include "common.hpp"
#include <fstream>
#include <vector>
#include <set>
using namespace std;
class Input_Output_Manager:public ofstream
{
public:
Input_Output_Manager( ifstream& basket_file,
const char* output_file_name );
int read_in_a_line( set<itemtype>& basket );
countertype find_frequent_items(
const double min_supp, vector<countertype>& support_of_items );
void basket_recode( const set<itemtype>& original_basket,
vector<itemtype>& new_basket );
void write_out_basket( const set<itemtype>& itemset );
void write_out_basket_and_counter( const set<itemtype>& itemset,
const countertype counter );
void rewind();
~Input_Output_Manager( );
private:
ifstream& basket_file;
vector<itemtype> new_code;
vector<itemtype> new_code_inverse;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?