📄 shuangseqiudlg.h
字号:
// ShuangSeQiuDlg.h : header file
//
#if !defined(AFX_SHUANGSEQIUDLG_H__7921B30E_7BE4_4DC0_BEC5_57D084612D9D__INCLUDED_)
#define AFX_SHUANGSEQIUDLG_H__7921B30E_7BE4_4DC0_BEC5_57D084612D9D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ComboListCtrl.h"
/////////////////////////////////////////////////////////////////////////////
// CShuangSeQiuDlg dialog
const int MaxItemCount = 250; //定义最多期数
const int POPNUM = 20; //种群数
class CShuangSeQiuDlg : public CDialog
{
// Construction
public:
void initVar();
void ReadHistroy();
CShuangSeQiuDlg(CWnd* pParent = NULL); // standard constructor
int cursel ; // 当前行
int totalsn; //流水号
int yuce;
int line; //历史记录行数
int snnum; //总期数
bool deleteflag ;
CString red[6]; //已经红球 1--33
CString blue; //已经蓝球 1--16
int StatRed[34]; //红球累计
int StatBlue[17]; //蓝球累计
float StatRedRate[34]; //红球累计率
float StatBlueRate[17]; //蓝球累计率
bool yecefail;
public: //预测功能用到的变量
void GAStudy(); //ga学习
void initpop(); //初始化种群
void ComputeFit(); //计算适应度
void SelectAndDeletePop(); //选择淘汰种群
void CrossPop(); //交叉操作
void Mutation(); //变异
int GetResult(); //得到最优种群
int ItemCountRed[POPNUM][6]; //随机红球出现值机率大的前20个球值;
int ItemCountBlue[POPNUM]; //
int sn[35]; //间接地址
int popnum; //种群数量
float ItemCountRedRate[20]; //每一个种群的适应度(加权)
int MAXRATE; //rate 排序前max的值
int max; //最多种群数
int min;
int maxindex; //最优种群ID
int minindex; //最差种群ID
int thebest; //最后得到的最优种群
int passval [12]; //生成新的号,在前期中也出现的个数不能超过2个,否则跳过,继续预测.
// Dialog Data
//{{AFX_DATA(CShuangSeQiuDlg)
enum { IDD = IDD_SHUANGSEQIU_DIALOG };
CComboListCtrl m_list;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CShuangSeQiuDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CShuangSeQiuDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBtnYuce();
afx_msg void OnBtnAdd();
afx_msg void OnBtnViewhistory();
afx_msg void OnBtnSave();
afx_msg void OnBtnHistorystat();
afx_msg void OnClickCodelist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnBtnHistory();
afx_msg void OnBtnDelete();
//}}AFX_MSG
afx_msg LRESULT OnCustomdrawMyList ( NMHDR* pNMHDR, LRESULT* pResult );
afx_msg LRESULT OnEndLabelEditVariableCriteria(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT PopulateComboList(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SHUANGSEQIUDLG_H__7921B30E_7BE4_4DC0_BEC5_57D084612D9D__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -