📄 hashtree.h
字号:
// HashTree.h: interface for the CHashTree class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_HASHTREE_H__65930613_0F74_4631_8520_4D5F779D9F6A__INCLUDED_)
#define AFX_HASHTREE_H__65930613_0F74_4631_8520_4D5F779D9F6A__INCLUDED_
#include "List.h"
#include "itemSet.h"
#define BUCKET_SIZE 100 /* the number of buckets in the hash tree*/
#define TABLE_SIZE 500 /* the number of buckets in the hash tree*/
#define LEAF 1
#define INTERNAL 2
/* node in the hash tree*/
//##ModelId=42E494EF0196
typedef struct hashnode HashNode;
//##ModelId=42E494EF01A5
struct hashnode
{
//##ModelId=42E494EF01B6
int nodetype; /* nodetype L=leaf, N=non-terminal node*/
union {
List *largeset; /*corresponding to a leaf node*/
HashNode *tab[TABLE_SIZE]; /*corresponding to a non-tem node, each bucket points to another node*/
} vp;
};
//##ModelId=42E494EF01C5
class CHashTree {
public:
//##ModelId=42E494EF01C7
HashNode *root;
//##ModelId=42E494EF01D4
CHashTree();
//##ModelId=42E494EF01D5
~CHashTree();
//##ModelId=42E494EF01D6
int hash(itemSet *itemset, int level);
//##ModelId=42E494EF01E5
HashNode * newnode(int nodetype);
//##ModelId=42E494EF01E7
void freenode(HashNode *node);
//##ModelId=42E494EF01F5
void insert(HashNode **hp, itemSet *s, int level );
//##ModelId=42E494EF0203
void subset(HashNode *head, itemSet *t, int m);
//##ModelId=42E494EF0207
void scan(HashNode *head, List *result, long minsup);
};
#endif // !defined(AFX_HASHTREE_H__65930613_0F74_4631_8520_4D5F779D9F6A__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -