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

📄 eoonemaxmutation.html

📁 这是linux下的进化计算的源代码。 === === === === === === === === === === === ===== check latest news at http:
💻 HTML
字号:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"><html><head>   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">   <meta name="GENERATOR" content="cpp2html Marc Schoenauer">   <title>eoOneMaxMutation.h</title></head><body text="#000000" bgcolor="#C3C2B4" link="#0000EE" vlink="#551A8B" alink="#FF0000"><a href="eoLesson5.html">Back to Lesson 5</a> - <a href="eoTutorial.html">Tutorialmain page </a>- <a href="eoTopDown.html">Top-Down page</a> - <a href="eoBottomUp.html">Bottom-uppage</a> - <a href="eoProgramming.html">Programming hints</a> - <font face="Arial,Helvetica"><a href="doc/html/index.html">EOdocumentation</a></font><br><hr WIDTH="100%"><!-- -------------- End of header ------------------ --><!-- ----------------------------------------------- --><center><h1><font color="#FF0000">eoOneMaxMutation.h</font></h1></center>The places where you have to put some code are on pink background.Only the the <a href="eoTutorial.html#colors">character colors have the usual meaning</a>.<br>&nbsp;<A NAME="start"></a><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE ><tr NOSAVE><td NOSAVE><tt><font color="#993300"><b>/** -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</b><br><b>The above line is useful in Emacs-like editors</b><br><b> */</b><br><b>/*</b><br><b>Template for simple mutation operators</b><br><b>======================================</b><br><b>*/</b><br><b>#ifndef eoOneMaxMutation_H</b><br><b>#define eoOneMaxMutation_H</b><br><b>#include &lt;eoOp.h></b><br><b>/** </b><br><b> *  &nbsp;Always write a comment in this format before class definition</b><br><b> *  &nbsp;if you want the class to be documented by Doxygen</b><br><b> *</b><br><b> * THere is NO ASSUMPTION on the class GenoypeT.</b><br><b> * In particular, it does not need to derive from EO</b><br><b> */</b><br></font></tt></td></tr></table><a NAME="mutation"></a><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE ><tr><td><tt><font color="#993399"><b>template&lt;class GenotypeT> </b><br><b>class eoOneMaxMutation: public eoMonOp&lt;GenotypeT></b><br><b>{</b><br><b>public:</b><br><b>  &nbsp;/**</b><br><b>  &nbsp; &nbsp;* Ctor - no requirement</b><br><b>  &nbsp; &nbsp;*/</b><br></font></tt></td></tr></table><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="FFCCCC" NOSAVE ><tr><td><tt><font color="#993399">// START eventually add or modify the anyVariable argument<br><b>  &nbsp;eoOneMaxMutation()</b><br><b>  &nbsp;</b>//  &nbsp;eoOneMaxMutation( varType  &nbsp;_anyVariable) : anyVariable(_anyVariable) <br>// END eventually add or modify the anyVariable argument<br></font></tt></td></tr></table><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE ><tr><td><tt><font color="#993399"><b>  &nbsp;{</b><br></font></tt></td></tr></table><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="FFCCCC" NOSAVE ><tr><td><tt><font color="#993399"><b>  &nbsp; &nbsp; &nbsp;</b>// START Code of Ctor of an eoOneMaxEvalFunc object<br><b>  &nbsp; &nbsp; &nbsp;</b>// END  &nbsp; &nbsp;Code of Ctor of an eoOneMaxEvalFunc object<br></font></tt></td></tr></table><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE ><tr><td><tt><font color="#993399"><b>  &nbsp;}</b><br><b>  &nbsp;</b>/// The class name. Used to display statistics<br><b>  &nbsp;string className() const { return "eoOneMaxMutation"; }</b><br><b>  &nbsp;/**</b><br><b>  &nbsp; &nbsp;* modifies the parent</b><br><b>  &nbsp; &nbsp;* @param _genotype The parent genotype (will be modified)</b><br><b>  &nbsp; &nbsp;*/</b><br><b>  &nbsp;bool operator()(GenotypeT & _genotype) </b><br><b>  &nbsp;{</b><br><b>  &nbsp; &nbsp; &nbsp;bool isModified;</b><br></font></tt></td></tr></table><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="FFCCCC" NOSAVE ><tr><td><tt><font color="#993399"><b>  &nbsp; &nbsp; &nbsp;</b>// START code for mutation of the _genotype object<br><b>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/** Requirement</b><br><b>* if (_genotype has been modified)</b><br><b>*  &nbsp; &nbsp; &nbsp; &nbsp;isModified = true;</b><br><b>* else</b><br><b>*  &nbsp; &nbsp; &nbsp; &nbsp;isModified = false;</b><br><b>*/</b><br><b>  &nbsp; &nbsp; &nbsp;return isModified;</b><br><b>  &nbsp; &nbsp; &nbsp;</b>// END code for mutation of the _genotype object<br></font></tt></td></tr></table><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE ><tr><td><tt><font color="#993399"><b>  &nbsp;}</b><br><b>private:</b><br></font></tt></td></tr></table><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="FFCCCC" NOSAVE ><tr><td><tt><font color="#993399">// START Private data of an eoOneMaxMutation object<br><b>  &nbsp;</b>//  &nbsp;varType anyVariable;		  &nbsp; &nbsp;// for example ...<br>// END  &nbsp; &nbsp;Private data of an eoOneMaxMutation object<br></font></tt></td></tr></table><table BORDER=0 CELLSPACING=0 COLS=1 WIDTH="100%" BGCOLOR="#CCCCCC" NOSAVE ><tr><td><tt><font color="#993399"><b>};</b><br><b>#endif</b><br></font></font></font></td></tr></table><hr WIDTH="100%"><a href="eoLesson5.html">Back to Lesson 5</a> - <a href="eoTutorial.html">Tutorialmain page </a>- <a href="eoTopDown.html">Top-Down page</a> - <a href="eoBottomUp.html">Bottom-uppage</a> - <a href="eoProgramming.html">Programming hints</a> - <font face="Arial,Helvetica"><a href="doc/html/index.html">EOdocumentation</a></font><hr><address><a href="mailto:marc.schoenauer@inria.fr">Marc Schoenauer</a></address><br><!-- Created: Nov 2000 --><!-- hhmts start -->Lastmodified: Wed May  1 07:18:00 2002<!-- hhmts end --></body></html>

⌨️ 快捷键说明

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