⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sgalib.h

📁 在软件测试的单元测试中
💻 H
字号:
#if !defined(AFX_SGALIB_H__35B1A89E_C3B4_42EB_B992_440EF970A66E__INCLUDED_)
#define AFX_SGALIB_H__35B1A89E_C3B4_42EB_B992_440EF970A66E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SGAlib.h : header file
//
#include "CProgramTested.h"
/////////////////////////////////////////////////////////////////////////////
// SGAlib window


class SGAlib : public CWnd
{
// Construction
public:
	SGAlib();

// Attributes
public:
	void advance_random();
	int flip(float);
	int rnd(int, int);
	void randomize();
	double randomnormaldeviate();
	float randomperc();
	float rndreal(float,float);
	void warmup_random(float);
	void initialize(),initdata(),initpop();
	void initreport(),generation(),initmalloc();
	void freeall(),nomemory(char*),report();
	void writepop(),writechrom(unsigned *);
	void preselect();
	void statistics(struct individual* );
	void repchar(FILE *,char*,int);
	void skip(FILE *,int);
	int select();
	void calcfitfunc(struct individual*);
	int crossover(unsigned*,unsigned*,unsigned*,unsigned*);
	void mutation(unsigned*);
	bool evaluate(struct individual*);

// Operations
public:
	
	
	int gen;
	int maxgen;
	int run;
	int maxruns;
	double sumfitness;
	unsigned max;
	double avg;
	unsigned min;
	float pcross;
	float pmutation;
	int popsize;
	int lchrom;
	int chromsize;
	int nmutation;
	int ncross;
	
	static double oldrand[55];
	static int jrand;
	static double rndx2;
	static int rndcalcflag;
	
    CProgramTested programtested;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(SGAlib)
	//}}AFX_VIRTUAL

// Implementation
public:
	void printpathvalue();
	
	virtual ~SGAlib();

	// Generated message map functions
protected:
	

	//{{AFX_MSG(SGAlib)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_SGALIB_H__35B1A89E_C3B4_42EB_B992_440EF970A66E__INCLUDED_)

⌨️ 快捷键说明

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