📄 fpt.h
字号:
#ifndef FPT_H_
#define FPT_H_
#define PLAT_WIN 1
/***** Data Structure *****/
/* Description:
* Each node of an FP-tree is represented by a 'FPnode' structure.
* Each node contains an item ID, count value of the item, and
* node-link as stated in the paper.
*
*/
typedef struct FPnode *FPTreeNode; /* Pointer to a FP-tree node */
typedef struct Childnode *childLink; /* Pointer to children of a FP-tree node */
/*
* Children of a FP-tree node
*/
typedef struct Childnode {
FPTreeNode node; /* A child node of an item */
childLink next; /* Next child */
} ChildNode;
/*
* A FP-tree node
*/
typedef struct FPnode {
int item; /* ID of the item.
Value of ID is within the range [0, m-1]
where m is the total number of different items in the database. */
int count; /* Value of count of the item.
This is the number of transactions containing items in the portion
of the path reaching this node. */
int numPath; /* Number of leaf nodes in the subtree
rooted at this node. It is used to
check whether there is only a single path
in the FPgrowth function. */
FPTreeNode parent; /* Pointer to parent node */
childLink children; /* Pointer to children */
FPTreeNode hlink; /* Horizontal link to next node with same item */
} FPNode;
/*
* A list to store large itemsets in descending order of their supports.
* It stores all the itemsets of supports >= threshold.
*/
typedef struct Itemsetnode *LargeItemPtr;
typedef struct Itemsetnode {
int support;
int *itemset;
LargeItemPtr next;
} ItemsetNode;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -