📄 itemheadertable.h
字号:
#ifndef ITEMHEADERTABLE_H
#define ITEMHEADERTABLE_H
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include "boost/functional/hash.hpp"
#include "boost/functional/hash/map.hpp"
#include "AppException.h"
#include "ItemInfo.h"
#include "Item.h"
#include "FrequentItemset.h"
typedef map<const size_t, ItemInfo* , ltstr> hashMap;
typedef map<const size_t, FrequentItemset* , ltstr> fiHashMap;
using namespace std;
using namespace boost;
class ItemHeaderTable {
friend ostream& operator<<(ostream& os, const ItemHeaderTable& iht);
public:
ItemHeaderTable(fiHashMap* fiMap);
virtual ~ItemHeaderTable();
void processNewNode(Node* node) throw (AppException);
void processNewItem(string name);
void processNewItem(Item* item);
void processMinimumSupport();
hashMap getItemInfoMap() const;
int getItemCount(string name);
void processItemHeaderTable(Node* node, string name) throw (AppException);
protected:
private:
hashMap itemInfoMap;
hash<string> string_hash;
vector<ItemInfo*>* itemInfoVec;
fiHashMap* fiMap;
int getSize() const;
void pushItemVector(Node* node, vector<vector<Item*>*>* branchVector);
void processConditionalPattern(string name, vector<vector<Item*>*>* branchVector);
void processItemVector(vector<Item*>* itemVector);
void frequencyTrimItemVector(vector<Item*>* itemVector);
void extractFrequentItemsets(string name, vector<Item*>* itemVector);
};
#endif /* ITEMHEADERTABLE_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -