components.h
来自「Solaris环境下的数据挖掘算法:birch聚类算法。该算法适用于对大量数据的」· C头文件 代码 · 共 108 行
H
108 行
/****************************************************************File Name: component.h Author: Tian Zhang, CS Dept., Univ. of Wisconsin-Madison, 1995 Copyright(c) 1995 by Tian Zhang All Rights ReservedPermission to use, copy and modify this software must be grantedby the author and provided that the above copyright notice appear in all relevant copies and that both that copyright notice and this permission notice appear in all relevant supporting documentations. Comments and additions may be sent the author at zhang@cs.wisc.edu.******************************************************************/#ifndef COMPONENT_H#define COMPONENT_Hclass Unit1 {private: int *unit; Unit1 *next;public: Unit1(); ~Unit1();friend class Component;friend ostream& operator<<(ostream &fo, Component *Compo);friend ofstream& operator<<(ofstream &fo, Component *Compo);};class Component {private: Unit1 *orig, *head, *tail; int start, end, size;public: Component(); ~Component(); int Size() const; void AddVertex(int i); int CurVertex(); void ResetVertex(); int TupleCnt(Entry *entry); void EntryChild(Stat* Stats, Entry *entry, ConNode** child, Entry &newentry, ConNode* &newchild);friend ostream& operator<<(ostream &fo, Component *Compo);friend ofstream& operator<<(ofstream &fo, Component *Compo);};ostream& operator<<(ostream &fo, Component *Compo);ofstream& operator<<(ofstream &fo, Component *Compo);class Unit2 {private: Component **unit; Unit2 *next;public: Unit2(); ~Unit2();friend class Components;friend ostream& operator<<(ostream &fo, Components *Compos);friend ofstream& operator<<(ofstream &fo, Components *Compos);};class Components {private: Unit2 *orig, *head, *tail; int start, end, ncluster, noutlier;public: Components(); ~Components(); int Size() const; int NumCluster() const; int NumOutlier() const; void AddComponent(Component *Compo); Component* CurComponent(); void ResetComponent();friend ostream& operator<<(ostream &fo, Components *Compos);friend ofstream& operator<<(ofstream &fo, Components *Compos);};ostream& operator<<(ostream &fo, Components *Compos);ofstream& operator<<(ofstream &fo, Components *Compos);class Graph {private: int size; short *flag; short *matrix;public: Graph(int n, Entry* entries); Graph(int n, Entry* entries, short ftype, double Ft, double density); ~Graph(); Components *Connected_Components();};#endif COMPONENT_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?