?? ps.h
字號:
#include "stdafx.h"
struct SparrowParticle
{
double *x;
double *v;
double *best_x;
double f;
double best_f;
};
class CPS
{
public:
CPS();
CPS(int pop_size,int param_number,double v_l,double v_h);
virtual ~CPS();
public:
int m_PopSize;
int m_ParamNumber;
double m_vl;
double m_vh;
double m_vmax;
SparrowParticle *m_sparrow;
double *m_gbest;
double m_fgbest;
int m_iter;
void InitPop();
void Propagation(double w);
void Iterate(int max_iter);
void DestroyPop();
double EvalFunc(double *x);
protected:
double CountFit(double *x);
int CountErr(double *x);
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -