AprioriView.h
上传用户:zscyanite
上传日期:2022-07-25
资源大小:4947k
文件大小:3k
开发平台:

Visual C++

  1. // AprioriView.h : interface of the CAprioriView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_APRIORIVIEW_H__AA04298D_4FFF_4146_A68F_EE770F93D049__INCLUDED_)
  5. #define AFX_APRIORIVIEW_H__AA04298D_4FFF_4146_A68F_EE770F93D049__INCLUDED_
  6. #define MaxSize 100
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10. class CAprioriSet;
  11. class CAprioriView : public CRecordView
  12. {
  13. protected: // create from serialization only
  14. CAprioriView();
  15. DECLARE_DYNCREATE(CAprioriView)
  16. public:
  17. //{{AFX_DATA(CAprioriView)
  18. enum { IDD = IDD_APRIORI_FORM };
  19. CListBox m_rlist;
  20. CListBox m_list;
  21. CAprioriSet* m_pSet;
  22. //}}AFX_DATA
  23. // Attributes
  24. public:
  25. CAprioriDoc* GetDocument();
  26. // Operations
  27. public:
  28. // Overrides
  29. // ClassWizard generated virtual function overrides
  30. //{{AFX_VIRTUAL(CAprioriView)
  31. public:
  32. virtual CRecordset* OnGetRecordset();
  33. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  34. protected:
  35. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  36. virtual void OnInitialUpdate(); // called first time after construct
  37. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  38. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  39. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  40. //}}AFX_VIRTUAL
  41. // Implementation
  42. public:
  43. CString CandLargeItem[MaxSize][MaxSize];//存放各级候选项目
  44. int ItemCount;//项目的个数
  45. double ItemSupp;//项目支持度
  46. double ItemConf;//项目的信任度
  47. int nDbItemCount;//统计数据库中事务个数
  48. CString LargeItem[MaxSize][MaxSize];//存放各级频繁项目
  49. int nItemCount;//设置数据库中总共有的各种不同项目个数
  50. int LargeItemCount[MaxSize];//存放各级频繁项目个数
  51. int DbItemCount[MaxSize];//每个事务的单项目个数
  52. CString DbItem[MaxSize][MaxSize];//存放每个事务的各个单项目
  53. int CandLargeItemCount[MaxSize];//存放各级候选项目个数
  54. int nCountCand[MaxSize];//统计各级候选项目集的个数
  55. int NLargeItemCount[MaxSize][MaxSize];//存放各级各个项目集的个数
  56. int ncount;//用于统计进行迭代的次数
  57. void SubItemGen(int ,CString);
  58. void AprioriGen( int );
  59. void FindLargeItem();
  60. bool Prune( int , CString);
  61. void ShowFreqItem(int );
  62. virtual ~CAprioriView();
  63. #ifdef _DEBUG
  64. virtual void AssertValid() const;
  65. virtual void Dump(CDumpContext& dc) const;
  66. #endif
  67. protected:
  68. // Generated message map functions
  69. protected:
  70. //{{AFX_MSG(CAprioriView)
  71. afx_msg void OnFreqBn();
  72. afx_msg void OnGetData();
  73. afx_msg void OnRuleBn();
  74. //}}AFX_MSG
  75. DECLARE_MESSAGE_MAP()
  76. };
  77. #ifndef _DEBUG  // debug version in AprioriView.cpp
  78. inline CAprioriDoc* CAprioriView::GetDocument()
  79.    { return (CAprioriDoc*)m_pDocument; }
  80. #endif
  81. /////////////////////////////////////////////////////////////////////////////
  82. //{{AFX_INSERT_LOCATION}}
  83. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  84. #endif // !defined(AFX_APRIORIVIEW_H__AA04298D_4FFF_4146_A68F_EE770F93D049__INCLUDED_)