⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 item.h

📁 使用C++STL实现的关联规则挖掘Apriori算法
💻 H
字号:
/*----------------------------------------------------------------------  File     : Item.h  Contents : itemset management  Author   : Bart Goethals  Update   : 4/4/2003 ----------------------------------------------------------------------*/#include <set>using namespace std;class Item{public:	Item(int i) : id(i), support(0), children(0) {}	Item(const Item &i) : id(i.id), support(i.support), children(i.children) {}	~Item(){}	int getId() const {return id;}	int Increment(int inc = 1) const {return support+=inc;}	set<Item> *makeChildren() const;	int deleteChildren() const;	int getSupport() const {return support;}	set<Item> *getChildren() const {return children;}	bool operator<(const Item &i) const{return id < i.id;}private:	const int id;	mutable int support;	mutable set<Item> *children;};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -