itemset.c
来自「关联规则中的频繁项集生成算法genmax」· C语言 代码 · 共 46 行
C
46 行
#include <iostream.h>#include <stdio.h>#include <errno.h>#include "itemset.h"// the constructorItemset::Itemset(int list_sz){ theitemset = new List<int>; if ( theitemset == NULL){ perror ("memory::Itemset"); exit(errno); } thetidlist = new Array(list_sz); if (thetidlist == NULL){ perror ("memory::Itemset"); exit(errno); } thesupport = 0;}// the destructorItemset::~Itemset(){ if (theitemset) delete theitemset; if (thetidlist) delete thetidlist; theitemset = NULL; thetidlist = NULL; thesupport = 0;}ostream &operator << (ostream &outputStream, Itemset &thitemset){ outputStream << "ISET: "; //output << theitemset -> print() << " "; outputStream << *thitemset.itemset() << " "; outputStream << "SUP: "; outputStream << thitemset.thesupport<< " "; //outputStream << "\n"; return outputStream;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?