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

📄 graph.h

📁 最大频繁集挖掘算法GENMAX 源代码
💻 H
字号:
#ifndef _GRAPH_H#define _GRAPH_H#include "GArray.h"#include "assoc.h"class GrItem{private:   int it;   int itsup;public:   GrItem(int itt=0, int ittsup=0):it(itt), itsup(ittsup){};   int& adj(){ return it; }   int& sup(){ return itsup; }   static int cmp_grit(const void *a, const void *b);   friend ostream& operator << (ostream& fout, GrItem git);};class GrNode: public GArray<GrItem *>{private:   int theItem;   int theItemSup;   long theSupSum;   //Array<int> *theSup;public:   GrNode(int sz=0):GArray<GrItem *>(sz), //theSup(Array<int>(sz)),   theItem(-1), theItemSup(0), theSupSum(0){}   int& item(){ return theItem; }   int& sup(){ return theItemSup; }   long & supsum(){ return theSupSum; }   boolean find(int val);   static int cmp_vertex(const void *a, const void *b);};class Graph: public GArray<GrNode *>{private:public:   static int numF1;   Graph(int nv):GArray<GrNode *>(nv){}   ~Graph();   void add_node(int item, int sup, int supsum=0);   void add_adj(int vert, int nbr, int nbrsup);   boolean connected(int vi, int vj);   void sort();   //void print_iset(Itemset *it);};#endif //_GRAPH_H

⌨️ 快捷键说明

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