?? status.h
字號:
/****************************************************************File Name: status.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 STATUS_H#define STATUS_H#define NUM_BUCKETS 100class Node;class Leaf;class Nonleaf;class Para;class BufferClass;class RecyQueueClass;extern Para *Paras;// for main tree or for outlier treeclass Stat {public:// status of execution of one tree// 1: static information from user inputshort Dimension;short WMflag; // 0 or 1Vector W; // weighting vecotrVector M; // moving vectorint PageSize;int MemSize; // in pagesint BufferSize; // in pagesint QueueSize; // in pagesint OutlierTreeSize;// in pages// from experiment settingsshort BDtype; // Phase1 and 2 distance typeshort Ftype; // Fitness type for leaf entriesshort Phase1Scheme; // 1short RebuiltAlg; // 2int StayTimes; // 3 double NoiseRate; // 0.25int Range; // Large to skip phase 2short CFDistr; // uniform or normaldouble H; // default 0, Smoothing parameterint *Bars; // 1000, Smoothing barsint K; // number of clustersdouble InitFt; // Initial fitness thresholddouble Ft; // Ending fitness thresholdshort Gtype; // Global Clustering Algorithm Labelshort GDtype; // Phase3 distance typeshort Qtype; // Quality typeshort RefineAlg; // Refinement Algorithmshort NoiseFlag; // removing noise in phase4 or notint MaxRPass; // Maximal Refine Pass// dynamic information from running statuschar name[MAX_NAME];short Phase;short Passi;double CurFt;int MemUsed;int TreeSize;int PrevEntryCnt;int CurrEntryCnt;int PrevDataCnt;int CurrDataCnt;int NoiseCnt;double AvgDensity;Node *OldRoot;Node *NewRoot;Leaf *OldLeafHead;Leaf *NewLeafHead;Leaf *RestLeafPtr;int RestLeafK;Rectangle Ranges; BufferClass *SplitBuffer;RecyQueueClass *OutlierQueue;Stat *OStats;Entry *Entries;int OutlierEntryCnt;int OutlierTupleCnt;Stat(char *str);~Stat();void SelectInitFt1();// for phase1: scheme A:void Accept1A(const Entry &ent);void ShiftTree1A();void CompactTree1A();void ScanLeaf1A();void RebuiltTree1A(short inc_flag);void SelectFtA();void SelectFtB();// for phase1: scheme B:void Accept1B(const Entry &ent);void RebuiltTree1B(short inc_flag);void SelectInitFt2();// for phase2void Accept2(const Entry &ent);void ShiftTree2();void CompactTree2();void ScanLeaf2();void RebuiltTree2(short inc_flag);// general useshort NextEntryFromLeafHead(int &pos, Entry &ent, Leaf **tmp);short NextEntryFreeOldLeafHead(int &pos, Entry &ent);short NextEntryFreeRestLeafPtr(int &pos, Entry &ent);void ScanSplitBuffer();void ScanOutlierQueue();// be careful:: return value is not sqr_eddouble AvgRDScanRoot();double AbsVScanLeafEntry();double AbsVScanLeafNode();double AvgDNNScanLeafEntry(short dtype);// be careful: return value is not sqr_eddouble FtSurvey1();double FtSurvey2();double FtSurvey3(double DistortPercent);// for ShiftTree1Avoid MakeNewTree();// for CompactTree1Avoid MarkNewTree();// for ScanLeaf1Avoid StartNewTree();// relevant to dimension and RECTANGLE optionint EntrySize() const;void CreateNewRoot(Node* child1, Node* child2);void Print_Tree(ofstream &fo) {fo<<NewRoot;}// outlier tree inherits main tree propertiesvoid Inherit(const Stat *Stats);friend istream& operator>>(istream &fi, Stat* Stats);friend ifstream& operator>>(ifstream &fi, Stat* Stats);friend ostream& operator<<(ostream &fo, Stat* Stats);friend ofstream& operator<<(ofstream &fo, Stat* Stats);friend ostream& operator<<(ostream &fo, Stat** Stats);friend ofstream& operator<<(ofstream &fo, Stat** Stats);};istream& operator>>(istream &fi, Stat* Stats);ifstream& operator>>(ifstream &fi, Stat* Stats);ostream& operator<<(ostream &fo, Stat* Stats);ofstream& operator<<(ofstream &fo, Stat* Stats);ostream& operator<<(ostream &fo, Stat** Stats);ofstream& operator<<(ofstream &fo, Stat** Stats);#endif STATUS_H
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -