estimation_and_sampling.hxx
来自「改算法基于遗传算法」· HXX 代码 · 共 36 行
HXX
36 行
// Time-stamp: <2007-07-11 01:27:06 handa>#ifndef ESTIMATION_AND_SAMPLING_H#define ESTIMATION_AND_SAMPLING_Husing namespace std;#include "chromoso.h"#include <vector>template <class T> class estimation_and_sampling {public: random_number& rn; estimation_and_sampling<T>(random_number& r): rn(r) { } // Estimating the joint prob. from pool and sampling // new populations (pop), that is, the preceeding population // is destroyed at this moment. virtual void generating(vector<chromosome<T> *>& pool, list<chromosome<T> *>& pop) =0; virtual estimation_and_sampling<T>& operator=(const estimation_and_sampling<T>& arg) { if(this == &arg) return *this; rn = arg.rn; // random }};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?