📄 clusterview.h
字号:
// clusterView.h : interface of the CClusterView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CLUSTERVIEW_H__11B35540_6194_4710_A70D_7F77A07A8673__INCLUDED_)
#define AFX_CLUSTERVIEW_H__11B35540_6194_4710_A70D_7F77A07A8673__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <afxdao.h>
#include "kmeans.h"
#include "Dbscan.h"
static COLORREF arColors[11] =
{
// RGB(0,0,0), // Black
RGB(0,0,255), // Blue
RGB(0,255,0), // Green
// RGB(0,255,255), // Cyan
RGB(255,0,0), // Red
RGB(255,0,255), // Magenta
RGB(255,255,0), // Yellow
RGB(50,100,100), // gray
RGB(128,128,128), // Dark gray
RGB(192,192,192), // Light gray
RGB(0,0,0) // Custom color
};
class CClusterView : public CView
{
protected: // create from serialization only
CClusterView();
DECLARE_DYNCREATE(CClusterView)
// Attributes
public:
CClusterDoc* GetDocument();
int count;
CDaoDatabase db;
// int k;
bool binput;
bool bshowcenter;
bool showDbscan;
bool showkm;
Ckmeans km;
Dbscan Ds;
CString lpszFile;// = GetPath();
// Operations
public:
int display();
void show();
void Add_Point(long x,long y, int c);
bool Create_db();
CString GetPath();
bool initiate(point *p);
int CheckFile();
void show_Dbscan(int n ,int *C,point *p);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CClusterView)
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:
virtual ~CClusterView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CClusterView)
afx_msg void OnBeginInput();
afx_msg void OnBeginEnd();
afx_msg void OnBeginKmeans();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnUpdateBeginEnd(CCmdUI* pCmdUI);
afx_msg void OnUpdateBeginInput(CCmdUI* pCmdUI);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnBeginShow();
afx_msg void OnUpdateBeginShow(CCmdUI* pCmdUI);
afx_msg void OnBeginHide();
afx_msg void OnUpdateBeginHide(CCmdUI* pCmdUI);
afx_msg void OnBeginSave();
afx_msg void OnBeginDense();
afx_msg void OnBeginDbscan();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in clusterView.cpp
inline CClusterDoc* CClusterView::GetDocument()
{ return (CClusterDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CLUSTERVIEW_H__11B35540_6194_4710_A70D_7F77A07A8673__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -