亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? eo.tpl

?? 這是linux下的進(jìn)化計算的源代碼。 === === === === === === === === === === === ===== check latest news at http:
?? TPL
?? 第 1 頁 / 共 2 頁
字號:
\TEMPLATE_START// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*-
//
// (The above line is useful in Emacs-like editors)
//
//*************************************
//
//  EASEA.cpp
//
//  C++ file generated by AESAE-EO v0.7
//
//*************************************
//
//
// Main file for creating a new representation in EO
// =================================================
//
// This main file includes all other files that have been generated by the
// script create.sh, so it is the only file to compile.
//
// In case you want to build up a separate library for your new Evolving Object,
// you'll need some work - follow what's done in the src/ga dir, used in the
// main file BitEA in tutorial/Lesson4 dir.
// Or you can wait until we do it :-)

// Miscellany includes and declarations
#include <iostream>
using namespace std;

// eo general include
#include "eo"
// real bounds (not yet in general eo include)
#include "utils/eoRealVectorBounds.h"

unsigned  *pCurrentGeneration;
unsigned  *pEZ_NB_GEN;
double EZ_MUT_PROB, EZ_XOVER_PROB, EZ_REPL_PERC=0.0;
int EZ_NB_GEN, EZ_POP_SIZE;
unsigned long EZ_NB_EVALUATIONS=0L;

inline int random(int b1=0, int b2=1){
  return rng.random(b2-b1)+b1;
}
inline double random(double b1=0, double b2=1){
  return rng.uniform(b2-b1)+b1;
}
inline float random(float b1=0, float b2=1){
  return rng.uniform(b2-b1)+b1;
}

\ANALYSE_PARAMETERS
\INSERT_USER_DECLARATIONS
\INSERT_INITIALISATION_FUNCTION

// include here whatever specific files for your representation
// Basically, this should include at least the following

/** definition of representation:
 * class EASEAGenome MUST derive from EO<FitT> for some fitness
 */
#include "EASEAGenome.h"

// GENOTYPE   EASEAGenome ***MUST*** be templatized over the fitness

//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// START fitness type: double or eoMaximizingFitness if you are maximizing
//                     eoMinimizingFitness if you are minimizing
typedef \MINIMAXI MyFitT ;  // type of fitness
// END fitness type
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

// Then define your EO objects using that fitness type
typedef EASEAGenome<MyFitT> Indi;      // ***MUST*** derive from EO

\INSERT_USER_FUNCTIONS

/** definition of evaluation:
 * class EASEAEvalFunc MUST derive from eoEvalFunc<EASEAGenome>
 * and should test for validity before doing any computation
 * see tutorial/Templates/evalFunc.tmpl
 */
#include "EASEAEvalFunc.h"

/** definition of initialization:
 * class EASEAGenomeInit MUST derive from eoInit<EASEAGenome>
 */
#include "EASEAInit.h"

/** include all files defining variation operator classes
 */
#include "EASEAMutation.h"
#include "EASEAQuadCrossover.h"

// Use existing modules to define representation independent routines
// These are parser-based definitions of objects

// how to initialize the population
// it IS representation independent if an eoInit is given
#include <make_pop.h>
eoPop<Indi >&  make_pop(eoParser& _parser, eoState& _state, eoInit<Indi> & _init){
  return do_make_pop(_parser, _state, _init);
}

// the stopping criterion
#include "make_continue.h"
eoContinue<Indi>& make_continue(eoParser& _parser, eoState& _state, eoEvalFuncCounter<Indi> & _eval){
  return do_make_continue(_parser, _state, _eval);
}

// outputs (stats, population dumps, ...)
#include <make_checkpoint.h>
eoCheckPoint<Indi>& make_checkpoint(eoParser& _parser, eoState& _state, eoEvalFuncCounter<Indi>& _eval, eoContinue<Indi>& _continue) {
  return do_make_checkpoint(_parser, _state, _eval, _continue);
}

// evolution engine (selection and replacement)
#include <make_algo_easea.h>
eoAlgo<Indi>&  make_algo_scalar(eoParser& _parser, eoState& _state, eoEvalFunc<Indi>& _eval, eoContinue<Indi>& _continue, eoGenOp<Indi>& _op){
  return do_make_algo_scalar(_parser, _state, _eval, _continue, _op);
}

// simple call to the algo. stays there for consistency reasons
// no template for that one
#include <make_run.h>
// the instanciating fitnesses
#include <eoScalarFitness.h>
void run_ea(eoAlgo<Indi>& _ga, eoPop<Indi>& _pop){
  do_run(_ga, _pop);
}

// checks for help demand, and writes the status file
// and make_help; in libutils
void make_help(eoParser & _parser);

// now use all of the above, + representation dependent things
int main(int argc, char* argv[]){

try  {
\INSERT_INIT_FCT_CALL

  eoParser parser(argc, argv);  // for user-parameter reading

  eoState state;    // keeps all things allocated

    // The fitness
    //////////////
   EASEAEvalFunc<Indi> plainEval/* (varType  _anyVariable) */;
   // turn that object into an evaluation counter
   eoEvalFuncCounter<Indi> eval(plainEval);

   // a genotype initializer
   EASEAInit<Indi> init;
   // or, if you need some parameters, you might as well
   // - write a constructor of the eoMyStructInit that uses a parser
   // - call it from here:
   //        eoEASEAInit<Indi> init(parser);


   // Build the variation operator (any seq/prop construct)
   // here, a simple example with only 1 crossover (2->2, a QuadOp) and
   // one mutation, is given.
   // Hints to have choice among multiple crossovers and mutations are given

   // A (first) crossover (possibly use the parser in its Ctor)
   EASEAQuadCrossover<Indi> cross /* (eoParser parser) */;

   // IF MORE THAN ONE:

    // read its relative rate in the combination
// double cross1Rate = parser.createParam(1.0, "cross1Rate", "Relative rate for crossover 1", '1', "Variation Operators").value();

    // create the combined operator with the first one (rename it cross1 !!!)
// eoPropCombinedQuadOp<Indi> cross(cross1, cross1Rate);

    // and as many as you want the following way:
    // 1- write the new class by mimicking eoEASEAQuadCrossover.h
    // 2- include that file here together with eoEASEAQuadCrossover above
    // 3- uncomment and duplicate the following lines:
    //
// eoEASEASecondCrossover<Indi> cross2(eoParser parser);
// double cross2Rate = parser.createParam(1.0, "cross2Rate", "Relative rate for crossover 2", '2', "Variation Operators").value();
// cross.add(cross2, cross2Rate);

  // NOTE: if you want some gentle output, the last one shoudl be like
  //  cross.add(cross, crossXXXRate, true);

    /////////////// Same thing for MUTATION

   // a (first) mutation   (possibly use the parser in its Ctor)
   EASEAMutation<Indi> mut /* (eoParser parser) */;

    // IF MORE THAN ONE:

    // read its relative rate in the combination
// double mut1Rate = parser.createParam(1.0, "mut1Rate", "Relative rate for mutation 1", '1', "Variation Operators").value();

    // create the combined operator with the first one (rename it cross1 !!!)
// eoPropCombinedMonOp<Indi> mut(mut1, mut1Rate);

    // and as many as you want the following way:
    // 1- write the new class by mimicking eoEASEAMutation.h
    // 2- include that file here together with eoEASEAMutation above
    // 3- uncomment and duplicate the following lines:
    //
// eoEASEASecondMutation<Indi> mut2(eoParser parser);
// double mut2Rate = parser.createParam(1.0, "mut2Rate", "Relative rate for mutation 2", '2', "Variation Operators").value();
// mut.add(mut2, mut2Rate);

  // NOTE: if you want some gentle output, the last one shoudl be like
  //  mut.add(mut, mutXXXRate, true);

  // now encapsulate your crossover(s) and mutation(s) into an eoGeneralOp
  // so you can fully benefit of the existing evolution engines

  // First read the individual level parameters
    double pCross = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ).value();
    // minimum check
    if ( (pCross < 0) || (pCross > 1) )
      throw runtime_error("Invalid pCross");

    double pMut = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ).value();
    // minimum check
    if ( (pMut < 0) || (pMut > 1) )
      throw runtime_error("Invalid pMut");

    // now create the generalOp
    eoSGAGenOp<Indi> op(cross, pCross, mut, pMut);



  //// Now the representation-independent things
  //
  // YOU SHOULD NOT NEED TO MODIFY ANYTHING BEYOND THIS POINT
  // unless you want to add specific statistics to the checkpoint
  //////////////////////////////////////////////

  // initialize the population
  // yes, this is representation indepedent once you have an eoInit
  eoPop<Indi>& pop   = make_pop(parser, state, init);
  // give popSize to AESAE control
  EZ_POP_SIZE = pop.size();

  // stopping criteria
  eoContinue<Indi> & term = make_continue(parser, state, eval);
  // output
  eoCheckPoint<Indi> & checkpoint = make_checkpoint(parser, state, eval, term);
  // algorithm (need the operator!)
  eoAlgo<Indi>& ga = make_algo_scalar(parser, state, eval, checkpoint, op);

  ///// End of construction of the algorithm

  /////////////////////////////////////////
  // to be called AFTER all parameters have been read!!!
  make_help(parser);

  //// GO
  ///////
  // evaluate intial population AFTER help and status in case it takes time
  apply<Indi>(eval, pop);
  // if you want to print it out
//   cout << "Initial Population\n";
//   pop.sortedPrintOn(cout);
//   cout << endl;

  run_ea(ga, pop); // run the ga

  cout << "Best individual in final population\n";
  cout << pop.best_element() << endl;

  }
  catch(exception& e)
  {
    cout << e.what() << endl;
  }
  return 0;
}

\START_EO_GENOME_H_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*-
//
// (The above line is useful in Emacs-like editors)
//
//*************************************
//
//  EASEAGenome.h
//
//  C++ file generated by AESAE-EO v0.7
//
//*************************************
//

#ifndef _EASEAGenome_h
#define _EASEAGenome_h

/**
 *  Always write a comment in this format before class definition
 *  if you want the class to be documented by Doxygen

 * Note that you MUST derive your structure from EO<fitT>
 * but you MAY use some other already prepared class in the hierarchy
 * like eoVector for instance, if you handle a vector of something....

 * If you create a structure from scratch,
 * the only thing you need to provide are
 *        a default constructor
 *        IO routines printOn and readFrom
 *
 * Note that operator<< and operator>> are defined at EO level
 * using these routines
 */
\ANALYSE_USER_CLASSES
\INSERT_USER_CLASSES

template< class FitT>
class EASEAGenome: public EO<FitT> {
public:
  /** Ctor: you MUST provide a default ctor.
   * though such individuals will generally be processed
   * by some eoInit object
   */
  EASEAGenome() : EO<FitT>()
  {
    // START Code of default Ctor of an EASEAGenome object
\GENOME_CTOR
    // END   Code of default Ctor of an EASEAGenome object
  }

  EASEAGenome(const EASEAGenome & arg) : EO<FitT>()
  {
\GENOME_CTOR
    copy(arg);
  }

  virtual ~EASEAGenome()
  {
    // START Code of Destructor of an EASEAGenome object
   \GENOME_DTOR
    // END   Code of Destructor of an EASEAGenome object
  }

  virtual string className() const { return "EASEAGenome"; }

  EASEAGenome& operator=(const EASEAGenome & arg) {
    copy(arg);
    return *this;
  }

  void copy(const EASEAGenome& genome)
  {
    if(&genome != this){
      \GENOME_DTOR
      \COPY_CTOR
      if (genome.invalid()) {	   // copying an invalid genome
	fitness(FitT());	   // put a valid value (i.e. non NAN)
	invalidate();		   // but INVALIDATE the genome
      }
      else
	fitness(genome.fitness());
    }
  }

  bool operator==(const EASEAGenome & genome) const {
    \EQUAL
      return true;
  }

  bool operator!=(const EASEAGenome & genome) const {
    return !(*this==genome);
  }

  /** printing... */
    void printOn(ostream& os) const
    {
      // First write the fitness
        EO<FitT>::printOn(os);
        os << ' ';
    // START Code of default output

  /** HINTS
   * in EO we systematically write the sizes of things before the things
   * so readFrom is easier to code (see below)
   */
\INSERT_DISPLAY
\WRITE
    // END   Code of default output
    }

  /** reading...
   * of course, your readFrom must be able to read what printOn writes!!!
   */
    void readFrom(istream& is)
      {
  // of course you should read the fitness first!
  EO<FitT>::readFrom(is);
    // START Code of input

  /** HINTS
   * remember the EASEAGenome object will come from the default ctor
   * this is why having the sizes written out is useful
   */
\READ
    // END   Code of input
      }

  //private:         // put all data here - no privacy in EASEA
    // START Private data of an EASEAGenome object
\INSERT_GENOME
    // END   Private data of an EASEAGenome object
};
#endif

\START_EO_EVAL_TPL// -*- mode: c++; c-indent-level: 2; c++-member-init-indent: 8; comment-column: 35; -*-
//
// (The above line is useful in Emacs-like editors)
//
//*************************************
//
//  EASEAEvalFunc.h
//
//  C++ file generated by AESAE-EO v0.7
//
//*************************************
//

/*
Evaluator in EO: a functor that computes the fitness of an EO
=============================================================
*/

#ifndef _EASEAEvalFunc_h
#define _EASEAEvalFunc_h

// include whatever general include you need
#include <stdexcept>
#include <fstream>

// include the base definition of eoEvalFunc
#include "eoEvalFunc.h"

/**
  Always write a comment in this format before class definition
  if you want the class to be documented by Doxygen
*/
template <class EOT>
class EASEAEvalFunc : public eoEvalFunc<EOT>
{
public:
  /// Ctor - no requirement
// START eventually add or modify the anyVariable argument
  EASEAEvalFunc()
  //  EASEAEvalFunc( varType  _anyVariable) : anyVariable(_anyVariable)
// END eventually add or modify the anyVariable argument
  {
    // START Code of Ctor of an EASEAEvalFunc object
    // END   Code of Ctor of an EASEAEvalFunc object
  }

  /** Actually compute the fitness
   *
   * @param EOT & _eo the EO object to evaluate
   *                  it should stay templatized to be usable
   *                  with any fitness type
   */
  void operator()(EOT & genome)
  {
    // test for invalid to avoid recomputing fitness of unmodified individuals
    if (genome.invalid())
      {
    // START Code of computation of fitness of the EASEA object
\INSERT_EVALUATOR
    // END   Code of computation of fitness of the EASEA object
      }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产裸体歌舞团一区二区| 麻豆国产一区二区| 成人免费高清在线观看| 2020国产精品| 国内成+人亚洲+欧美+综合在线| 日韩视频免费观看高清完整版 | 99国产精品久久久久久久久久久| 日本美女一区二区三区| 国产激情一区二区三区四区| 中文一区二区完整视频在线观看| 不卡一区在线观看| 亚洲午夜一区二区| 91精品国产综合久久久久| 美日韩一级片在线观看| 欧美极品少妇xxxxⅹ高跟鞋| 色94色欧美sute亚洲线路二| 婷婷六月综合网| 久久久综合视频| 色综合天天综合狠狠| 男男视频亚洲欧美| 国产精品三级av在线播放| 欧美在线免费播放| 激情综合五月婷婷| 亚洲欧美国产77777| 欧美日免费三级在线| 日韩一区二区三区四区| 国产福利一区二区三区| 一区二区三区四区五区视频在线观看 | 91丝袜美女网| 蜜桃在线一区二区三区| 亚洲丝袜精品丝袜在线| 欧美一区二区三区白人| 精品美女一区二区三区| 五月激情综合婷婷| 国产精品色哟哟| 欧美一二三四区在线| 99精品偷自拍| 老司机精品视频线观看86| 亚洲精品成人天堂一二三| 欧美成人福利视频| 在线免费不卡视频| 高清beeg欧美| 久久国产欧美日韩精品| 一区二区三区蜜桃| 国产精品美女久久久久久久| 日韩三区在线观看| 在线视频欧美精品| www.99精品| 国产成人午夜视频| 老鸭窝一区二区久久精品| 一区二区三区四区精品在线视频| 91在线观看美女| 欧美一区日本一区韩国一区| 亚洲最大成人综合| 欧美激情一区二区三区四区| 欧美一区二区三区在线| 欧美亚洲愉拍一区二区| 91小视频在线观看| 成人亚洲一区二区一| 狠狠色丁香久久婷婷综合丁香| 亚洲一区二区三区爽爽爽爽爽| 中文字幕av一区 二区| 精品国产一区久久| 日韩丝袜美女视频| 91麻豆精品国产91| 欧美日韩在线播放三区四区| 色天使色偷偷av一区二区| www.99精品| 97久久精品人人做人人爽50路| 国产精品资源站在线| 狠狠色丁香久久婷婷综合丁香| 久久精品国产免费| 另类小说视频一区二区| 久久精品国产网站| 激情六月婷婷久久| 国内精品自线一区二区三区视频| 麻豆成人久久精品二区三区小说| 中文在线一区二区| 国产精品网站导航| 亚洲欧洲日韩女同| 亚洲黄色av一区| 亚洲成人免费av| 91精品婷婷国产综合久久| 欧美精品视频www在线观看| 欧美性色综合网| 三级一区在线视频先锋| 欧美日韩国产高清一区二区 | 国产成人夜色高潮福利影视| 国产精品69久久久久水密桃| 国产一区二区三区日韩| 成人自拍视频在线| 26uuu国产在线精品一区二区| 懂色一区二区三区免费观看| 国产高清不卡二三区| 99视频一区二区| 色久综合一二码| 欧美精品乱人伦久久久久久| 欧美电影免费观看高清完整版在| 精品国产91乱码一区二区三区| 久久精品男人天堂av| 一色屋精品亚洲香蕉网站| 亚洲美女在线一区| 丝袜美腿亚洲综合| 国产精品一区二区在线观看不卡 | 欧美激情艳妇裸体舞| 亚洲欧美另类在线| 日本最新不卡在线| 国产精品一区二区在线播放| 夜夜嗨av一区二区三区网页 | 国产高清成人在线| 91麻豆国产香蕉久久精品| 亚洲国产日产av| 中文字幕视频一区二区三区久| 一区二区三区四区在线播放| 久久精品国产亚洲高清剧情介绍 | 亚洲观看高清完整版在线观看| 亚洲人一二三区| 日本强好片久久久久久aaa| 国产美女精品人人做人人爽| 99精品欧美一区二区三区综合在线| 欧美日韩国产一区二区三区地区| 久久久久久久久久久久电影| 亚洲精品午夜久久久| 狠狠色丁香婷婷综合久久片| 91福利区一区二区三区| 久久亚洲综合色| 亚洲www啪成人一区二区麻豆| 国产精品综合网| 欧美老人xxxx18| 日韩理论电影院| 激情国产一区二区| 欧美日韩黄视频| 中文字幕亚洲视频| 激情综合色播五月| 欧美片在线播放| 国产精品久久久久久久久果冻传媒| 三级精品在线观看| 亚洲综合一二三区| 成人精品亚洲人成在线| 日韩美女主播在线视频一区二区三区 | 欧美日韩免费观看一区二区三区| 亚洲精品日韩一| 国内精品国产三级国产a久久| 91福利精品视频| 亚洲欧洲色图综合| 丁香网亚洲国际| 久久天天做天天爱综合色| 91免费精品国自产拍在线不卡| 成人黄色小视频| 久久免费美女视频| 蜜桃视频免费观看一区| 欧美日韩mp4| 亚洲超碰精品一区二区| 欧美性生活一区| 亚洲国产日韩综合久久精品| 北岛玲一区二区三区四区| 久久久久成人黄色影片| 韩国av一区二区三区在线观看 | 欧美一区二区三区四区久久| 一区二区三区色| 91视频免费播放| 亚洲丝袜精品丝袜在线| 91农村精品一区二区在线| 国产人成一区二区三区影院| 国产在线日韩欧美| 精品成人佐山爱一区二区| 精品一区二区影视| 精品对白一区国产伦| 久久99九九99精品| 日韩欧美亚洲一区二区| 精品亚洲国产成人av制服丝袜| 日韩精品中文字幕一区二区三区| 日本欧洲一区二区| 精品久久久影院| 国产精品白丝jk白祙喷水网站| 成人激情动漫在线观看| 中文在线一区二区 | 激情成人综合网| 成人精品电影在线观看| 成人av小说网| 综合在线观看色| 在线观看三级视频欧美| 午夜精品在线看| 日韩精品一区二| 国产成人亚洲综合色影视| 欧美激情一区二区三区四区| 91在线观看美女| 青青草原综合久久大伊人精品| 午夜精品一区二区三区三上悠亚| 国产激情视频一区二区在线观看| 欧美经典三级视频一区二区三区| 91麻豆免费在线观看| 亚洲一区二区在线免费观看视频 | 风间由美一区二区三区在线观看 | 91久久精品网| 另类的小说在线视频另类成人小视频在线 | 日本道免费精品一区二区三区| 日韩av一二三| 国产九色sp调教91| 久久久精品综合|