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

📄 mfgaview.h

📁 混沌遗传算法应用于微波滤波器
💻 H
字号:
// MFGAView.h : interface of the CMFGAView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MFGAVIEW_H__BAC035D2_45F8_4768_84C3_2899B7BF296E__INCLUDED_)
#define AFX_MFGAVIEW_H__BAC035D2_45F8_4768_84C3_2899B7BF296E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "individual.h"
#include "bestever.h"
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <malloc.h>
#include <stdlib.h>
#include "Matrixex.h"  
#include <complex> 
#include <iostream> 
using namespace std;	

class CMFGAView : public CScrollView
{
protected: // create from serialization only
	CMFGAView();
	DECLARE_DYNCREATE(CMFGAView)

// Attributes
public:
	CMFGADoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMFGAView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnInitialUpdate();
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void report();
	void delminind(class individual *);
	void keepbestind(class individual *);
	void draws21(class bestever *);
	void draws11(class bestever *);
	void Display(CDC *pDC, double dis[], int a, int b);
	void SetXYAxis(CDC *,int ,int );
    int select();
	void warmup_random(double random_seed);
	int rnd(int low,int high);
	float randomperc();
	int flip(double prob);
	void mutation(unsigned **child);
	void objfunc(class individual  *critter);
	void statistics(class individual *pop);
	void preselect();
	void freeall();
	void initmalloc();
	void generation();
	void initpop();
	void advance_random();
	void  crossover(unsigned  **parent1, unsigned  **parent2, unsigned **child1, unsigned **child2,int jcr[]);
	void Zinversion(class individual  *,complex<double> *,complex<double> *,complex<double> *,complex<double> *,double *);
    void parameters(class individual  *,double *,double *,double * ,double *);
    void varible(class individual  *);
   
   individual *oldpop;    
   individual *newpop;
   individual bestone;
   bestever bestfit; 
   double sumfitness;    
   double max;    
   double avg;    
   double min;    
   double  pcross;    
   double  pmutation;    
   int    popsize;    
   int    lchrom;    
   int    chromsize;    
   int  gen;    
   int  maxgen;
   int  run;    
   int  maxruns;      
   int  nmutation;    
   int    ncross;    
   double randomseed;
   double wd;   
   int N;  
   int x1;
   int y1; 
   int x2;
   int y2;
   bool PdsBtEn;
   double ps1[800];
   double ps2[800];
   double oldrand[55];
   int jrand;
   FILE *outfp;

	virtual ~CMFGAView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CMFGAView)
	afx_msg void OnSgaDraw();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in MFGAView.cpp
inline CMFGADoc* CMFGAView::GetDocument()
   { return (CMFGADoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_MFGAVIEW_H__BAC035D2_45F8_4768_84C3_2899B7BF296E__INCLUDED_)

⌨️ 快捷键说明

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