Paradiseo-eo sources added
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@40 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
bc1f453978
commit
c3aec878e5
3609 changed files with 342772 additions and 0 deletions
250
trunk/paradiseo-eo/doc/html/classeo_how_many.html
Normal file
250
trunk/paradiseo-eo/doc/html/classeo_how_many.html
Normal file
|
|
@ -0,0 +1,250 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>EO: eoHowMany Class Reference</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.3.9.1 -->
|
||||
<div class="qindex"> <form class="search" action="search.php" method="get">
|
||||
<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
|
||||
<h1>eoHowMany Class Reference</h1>A helper class, to determine a number of individuals from another one Typically, is used in selection / replacement procedures, e.g.
|
||||
<a href="#_details">More...</a>
|
||||
<p>
|
||||
<code>#include <<a class="el" href="eo_how_many_8h-source.html">eoHowMany.h</a>></code>
|
||||
<p>
|
||||
<p>Inheritance diagram for eoHowMany:
|
||||
<p><center><img src="classeo_how_many.png" usemap="#eoHowMany_map" border="0" alt=""></center>
|
||||
<map name="eoHowMany_map">
|
||||
<area href="classeo_persistent.html" alt="eoPersistent" shape="rect" coords="0,56,83,80">
|
||||
<area href="classeo_printable.html" alt="eoPrintable" shape="rect" coords="0,0,83,24">
|
||||
</map>
|
||||
<a href="classeo_how_many-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr><td></td></tr>
|
||||
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_how_many.html#a0">eoHowMany</a> (double _rate=0.0, bool _interpret_as_rate=true)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Original Ctor from direct rate + bool. <a href="#a0"></a><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1" doxytag="eoHowMany::eoHowMany"></a>
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_how_many.html#a1">eoHowMany</a> (int _combien)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Ctor from an int - both from int and unsigned int are needed to avoid ambiguity with the Ctor from a double. <br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="eoHowMany::eoHowMany"></a>
|
||||
</td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_how_many.html#a2">eoHowMany</a> (unsigned int _combien)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Ctor from an unsigned int - both from int and unsigned int are needed to avoid ambiguity with the Ctor from a double. <br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3" doxytag="eoHowMany::~eoHowMany"></a>
|
||||
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_how_many.html#a3">~eoHowMany</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Virtual dtor. They are needed in virtual class hierarchies. <br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_how_many.html#a4">operator()</a> (unsigned int _size)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Does what it was designed for combien==0 : return rate*_size else combien>0 : return combien (regardless of _size) combien<0 : return _size-|combien|. <a href="#a4"></a><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_how_many.html#a5">printOn</a> (std::ostream &_os) const </td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write object. <a href="#a5"></a><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_how_many.html#a6">readFrom</a> (std::istream &_is)</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">Read object. <a href="#a6"></a><br></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a7" doxytag="eoHowMany::readFrom"></a>
|
||||
void </td><td class="memItemRight" valign="bottom"><b>readFrom</b> (std::string _value)</td></tr>
|
||||
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8" doxytag="eoHowMany::operator-"></a>
|
||||
<a class="el" href="classeo_how_many.html">eoHowMany</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_how_many.html#a8">operator-</a> ()</td></tr>
|
||||
|
||||
<tr><td class="mdescLeft"> </td><td class="mdescRight">The unary - operator: reverses the computation. <br></td></tr>
|
||||
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="r0" doxytag="eoHowMany::rate"></a>
|
||||
double </td><td class="memItemRight" valign="bottom"><b>rate</b></td></tr>
|
||||
|
||||
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="r1" doxytag="eoHowMany::combien"></a>
|
||||
int </td><td class="memItemRight" valign="bottom"><b>combien</b></td></tr>
|
||||
|
||||
</table>
|
||||
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
||||
A helper class, to determine a number of individuals from another one Typically, is used in selection / replacement procedures, e.g.
|
||||
<p>
|
||||
the number of offspring from the number of parents, or the number of survivors for an <a class="el" href="classeo_reduce.html">eoReduce</a> functor, ...<p>
|
||||
Such construct is very useful because in some cases you might not know the population size that will enter the replacement. For instance, you cannot simply have a pre-computed (double) rate of 1/popSize if you want to select or kill just 1 guy. Using an eoHowMany allows one to modify the population size without touching anything else.<p>
|
||||
There are 4 possible way to compute the return value from the argument:<ul>
|
||||
<li>an absolute POSITIVE integer --> return it (regardless of popsize)</li><li>a POSITIVE rate --> return rate*popSize</li><li>an absolute NEGATIVE integer --> return popsize-rate (if positive)</li><li>a NEGATIVE rate in [-1,0] --> store and use 1-|rate| (positive) Note that a negative rate should be have been necessary because a rate is relative, but it is there for consistency reasons - and because it is needed in <a href="classeo_g3_replacement_h-source.html">eoG3Replacement</a></li></ul>
|
||||
<p>
|
||||
It has 2 private members, a double and an integer to cover all cases<p>
|
||||
Example use: in <a href="class_eogeneralbreeder.html">eoGeneralBreeder.h</a> Example reading from parser: in <a href="make_algo_scalar_h-source.html">do/make_algo_scalar.h line 141</a><p>
|
||||
MS 10/04/2002: Added the possibility to have a negative number - when treated as a number: returns then (size - combien) Should not modify anything when a positive number is passed in the ctor<p>
|
||||
MS 20/06/2002: Added the negative rate and the <a class="el" href="classeo_how_many.html#a8">operator-()</a> (for eoG3Repalcement)<p>
|
||||
It is an <a class="el" href="classeo_persistent.html">eoPersistent</a> because we need to be able to use eoParamValue<eoHowMany>
|
||||
<p>
|
||||
|
||||
<p>
|
||||
Definition at line <a class="el" href="eo_how_many_8h-source.html#l00069">69</a> of file <a class="el" href="eo_how_many_8h-source.html">eoHowMany.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
|
||||
<a class="anchor" name="a0" doxytag="eoHowMany::eoHowMany"></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top">eoHowMany::eoHowMany </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">double </td>
|
||||
<td class="mdname" nowrap> <em>_rate</em> = <code>0.0</code>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="md" nowrap align="right"></td>
|
||||
<td class="md"></td>
|
||||
<td class="md" nowrap>bool </td>
|
||||
<td class="mdname" nowrap> <em>_interpret_as_rate</em> = <code>true</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="md"></td>
|
||||
<td class="md">) </td>
|
||||
<td class="md" colspan="2"><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Original Ctor from direct rate + bool.
|
||||
<p>
|
||||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||
<table border="0" cellspacing="2" cellpadding="0">
|
||||
<tr><td valign="top"></td><td valign="top"><em>rate</em> </td><td>the rate, OR the integer to store, depending on 2nd arg. </td></tr>
|
||||
<tr><td valign="top"></td><td valign="top"><em>_interpret_as_rate</em> </td><td>to tell whether the rate actually is a rate </td></tr>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
Definition at line <a class="el" href="eo_how_many_8h-source.html#l00076">76</a> of file <a class="el" href="eo_how_many_8h-source.html">eoHowMany.h</a>. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr><h2>Member Function Documentation</h2>
|
||||
<a class="anchor" name="a4" doxytag="eoHowMany::operator()"></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top">unsigned int eoHowMany::operator() </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">unsigned int </td>
|
||||
<td class="mdname1" valign="top" nowrap> <em>_size</em> </td>
|
||||
<td class="md" valign="top"> ) </td>
|
||||
<td class="md" nowrap><code> [inline]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Does what it was designed for combien==0 : return rate*_size else combien>0 : return combien (regardless of _size) combien<0 : return _size-|combien|.
|
||||
<p>
|
||||
<ul>
|
||||
<li>* - * - * - </li></ul>
|
||||
|
||||
<p>
|
||||
Definition at line <a class="el" href="eo_how_many_8h-source.html#l00114">114</a> of file <a class="el" href="eo_how_many_8h-source.html">eoHowMany.h</a>. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a5" doxytag="eoHowMany::printOn"></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top">virtual void eoHowMany::printOn </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">std::ostream & </td>
|
||||
<td class="mdname1" valign="top" nowrap> <em>_os</em> </td>
|
||||
<td class="md" valign="top"> ) </td>
|
||||
<td class="md" nowrap> const<code> [inline, virtual]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Write object.
|
||||
<p>
|
||||
It's called printOn since it prints the object on a stream. <dl compact><dt><b>Parameters:</b></dt><dd>
|
||||
<table border="0" cellspacing="2" cellpadding="0">
|
||||
<tr><td valign="top"></td><td valign="top"><em>_os</em> </td><td>A std::ostream. </td></tr>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
Implements <a class="el" href="classeo_printable.html#a1">eoPrintable</a>.
|
||||
<p>
|
||||
Definition at line <a class="el" href="eo_how_many_8h-source.html#l00130">130</a> of file <a class="el" href="eo_how_many_8h-source.html">eoHowMany.h</a>. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<a class="anchor" name="a6" doxytag="eoHowMany::readFrom"></a><p>
|
||||
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td class="mdRow">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="md" nowrap valign="top">virtual void eoHowMany::readFrom </td>
|
||||
<td class="md" valign="top">( </td>
|
||||
<td class="md" nowrap valign="top">std::istream & </td>
|
||||
<td class="mdname1" valign="top" nowrap> <em>_is</em> </td>
|
||||
<td class="md" valign="top"> ) </td>
|
||||
<td class="md" nowrap><code> [inline, virtual]</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="5" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<p>
|
||||
Read object.
|
||||
<p>
|
||||
<dl compact><dt><b>Parameters:</b></dt><dd>
|
||||
<table border="0" cellspacing="2" cellpadding="0">
|
||||
<tr><td valign="top"></td><td valign="top"><em>_is</em> </td><td>A std::istream. </td></tr>
|
||||
</table>
|
||||
</dl>
|
||||
<dl compact><dt><b>Exceptions:</b></dt><dd>
|
||||
<table border="0" cellspacing="2" cellpadding="0">
|
||||
<tr><td valign="top"></td><td valign="top"><em>runtime_std::exception</em> </td><td>If a valid object can't be read. </td></tr>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
Implements <a class="el" href="classeo_persistent.html#a1">eoPersistent</a>.
|
||||
<p>
|
||||
Definition at line <a class="el" href="eo_how_many_8h-source.html#l00140">140</a> of file <a class="el" href="eo_how_many_8h-source.html">eoHowMany.h</a>. </td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="eo_how_many_8h-source.html">eoHowMany.h</a></ul>
|
||||
<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 19 05:06:50 2006 for EO by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue