fp_treeview.h

来自「 关联规则fp算法」· C头文件 代码 · 共 142 行

H
142
字号
// fp_treeView.h : interface of the CFp_treeView class
//
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INCLUDES()
#include "datagrid.h"
//}}AFX_INCLUDES

#if !defined(AFX_FP_TREEVIEW_H__E5C6B6A5_8741_401F_9D94_A645E0EC7AAD__INCLUDED_)
#define AFX_FP_TREEVIEW_H__E5C6B6A5_8741_401F_9D94_A645E0EC7AAD__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "column.h"
#include "columns.h"

#include "HeadTable.h"
#include <afxtempl.h>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <math.h>
using namespace std;

#include "Tree.h"	// Added by ClassView

typedef vector<CString> SORTVECTOR;
using namespace std;
typedef vector<CString> SORTVECTOR;
			
class CFp_treeView : public CFormView
{
protected: // create from serialization only
	CFp_treeView();
	DECLARE_DYNCREATE(CFp_treeView)

public:
	//{{AFX_DATA(CFp_treeView)
	enum { IDD = IDD_FP_TREE_FORM };
	CListBox	m_List6;
	CListBox	m_List5;
	CListBox	m_List4;
	CListBox	m_List3;
	CListBox	m_List2;
	CListBox	m_List1;
	CListBox	m_ListBox;
	CString	m_strConnection;
	CString	m_strSQL;
	CDataGrid	m_DataGrid;
	_ConnectionPtr m_Connection;
	_RecordsetPtr m_Recordset;
	CString m_strTableName;
	CString m_strColName;
	BOOL isDesc;
	CString	m_Edit1;
	UINT	m_Edit2;
	CString	m_dmTime;
	//}}AFX_DATA
	UINT	m_minCount;//最小支持度
	CTree fptree;
	CArray<CHeadTable,CHeadTable> headTableArray,tempArray;
	SORTVECTOR sortVector;
	SORTVECTOR::iterator sortIterator;
	int m_ButtonFlag;
	int m_MenuFlag;

// Attributes
public:
	CFp_treeDoc* GetDocument();

// Operations
public:
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFp_treeView)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void comb(int n, int m, int buff[], int count, CArray<CHeadTable,CHeadTable> &itemArray, CArray<CHeadTable,CHeadTable>  &itemSet);
	void resetList();
	int minValue(int x,int y);
	BOOL findKeyitem(CString str);
	void fpGrowth(CTree &tree,CArray<CHeadTable,CHeadTable> &array,CString item);
	void insertNode(CTree &tree,CString item,CString items);
	void constructTree(CString items);
	void insertTree(CTree &tree,CString items);
	void sortItem(int Index,int count);
	int checkItem(CArray<CHeadTable,CHeadTable> &checkArray,CString item);
	void getTables();
	void GenerateError(HRESULT hr,PWSTR pwszDescription);
	virtual ~CFp_treeView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CFp_treeView)
	afx_msg void OnSource();
	afx_msg void OnConnect();
	afx_msg void OnExecute();
	afx_msg void OnDisconnect();
	afx_msg void OnQuit();
	afx_msg void OnSelchangeList();
	afx_msg void OnHeadClickDatagrid(short ColIndex);
	afx_msg void OnFptree();
	afx_msg void OnTest1();
	afx_msg void OnDblclkList1();
	afx_msg void OnDblclkList5();
	afx_msg void OnSave();
	afx_msg void OnDel();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in fp_treeView.cpp
inline CFp_treeDoc* CFp_treeView::GetDocument()
   { return (CFp_treeDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FP_TREEVIEW_H__E5C6B6A5_8741_401F_9D94_A645E0EC7AAD__INCLUDED_)

⌨️ 快捷键说明

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