📄 somdoc.h
字号:
// SOMDoc.h : interface of the CSOMDoc class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_SOMDOC_H__F7425372_790A_4701_AA0B_688EDBCE28F7__INCLUDED_)
#define AFX_SOMDOC_H__F7425372_790A_4701_AA0B_688EDBCE28F7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <vector>
#include "PainterFacade.h"
using namespace std;
typedef vector<CPointf> VecPoint;
class CSOMDoc : public CDocument
{
protected: // create from serialization only
CSOMDoc();
DECLARE_DYNCREATE(CSOMDoc)
public:
void ClearPatterns();
void ResetWeights(int lines, int column);
void AddNormalPatterns(int nNum, double miu, double sigma, double min, double max);
void AddAveragePatterns(int nNum, double min, double max);
const VecPoint& GetPatterns() { return m_vecPatterns; }
CPointf& GetWeight(int line, int column);
/****************************************************
return false if no large changes occur in weights or something goes wrong,
otherwise return true
/*****************************************************/
bool Train(int nIndex, int step);
private:
VecPoint m_vecPatterns;
VecPoint m_vecWeights;
int m_nLine;
int m_nColumn;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSOMDoc)
public:
virtual BOOL OnNewDocument();
virtual void Serialize(CArchive& ar);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CSOMDoc();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CSOMDoc)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SOMDOC_H__F7425372_790A_4701_AA0B_688EDBCE28F7__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -