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

📄 statistics.h

📁 linux下的一个分组遗传算法
💻 H
字号:
//// statistics.h - Used for the Genetic Grouping Algorithm//// author: J.I.v.Hemert// last updated : 07-11-1997//// This file constains the class StatisticsC. It is used to// calculate the Succes Rate (SR), Average Evaluations to // Solution (AES), and the number of colors used in the final// chromosome. It records these values in a file together// with all the data for the experiment. On user request it// builds two more files, these can be used to plot the SR and// AES against a variable that is being tested in a range.//#ifndef STATISTICS_H#define STATISTICS_H#ifdef SunOS#endif#include <fstream.h>#include <iomanip.h>#include <unistd.h>#include "inifile.h"#include "timer.h"#include "prog.h"class StatisticsC{	public:		void Initialize (bool & rescue);		void Reset ();		void UpdateSR (double add);		void UpdateAES (double add);		void UpdateColorsUsed (double add);		void Run ();		void Print (double rangevar);		void LoadRescueFile (double & rangevar, int & run);		void SaveRescueFile (double rangevar);		void Close ();	private:		TimerC timer;		TimerC totaltimer;		ofstream statisticsfile;		ofstream graphAESfile;		ofstream graphSRfile;		ofstream graphCOLORSfile;		bool printgraphs;		int runs;		double AES;		double addedAES;		double SR; 		double addedSR; 		double colorsused;		double addedcolorsused;};#endif// eof statistics.h

⌨️ 快捷键说明

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