?? pr_exerciseview.h
字號(hào):
// PR_exerciseView.h : interface of the CPR_exerciseView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_PR_EXERCISEVIEW_H__78478F3B_759E_42C7_9CAE_4E5BDD59B80A__INCLUDED_)
#define AFX_PR_EXERCISEVIEW_H__78478F3B_759E_42C7_9CAE_4E5BDD59B80A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define MAX_TOTAL 2000
#define MAX_DIMENSION 100
class CPR_exerciseView : public CEditView
{
protected: // create from serialization only
CPR_exerciseView();
DECLARE_DYNCREATE(CPR_exerciseView)
// Attributes
public:
CPR_exerciseDoc* GetDocument();
float samples[MAX_TOTAL][MAX_DIMENSION];
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPR_exerciseView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
CString dataSamples;
virtual ~CPR_exerciseView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CPR_exerciseView)
afx_msg void OnDataCreate();
afx_msg void OnKnearest();
afx_msg void OnFastKnearest();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void OutputClassifyResult(int* &nearestCls, int refusePoint);
void SamplesDecompose(float* &distance, float** &means, float** &allDistance);
void GenerateTestSample();
int nearestClass;
float * testSample;
int kNearestNum;
int dataTotal;
int dimen;
int classNum;
};
#ifndef _DEBUG // debug version in PR_exerciseView.cpp
inline CPR_exerciseDoc* CPR_exerciseView::GetDocument()
{ return (CPR_exerciseDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PR_EXERCISEVIEW_H__78478F3B_759E_42C7_9CAE_4E5BDD59B80A__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -