git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@40 331e1502-861f-0410-8da2-ba01fb791d7f
615 lines
33 KiB
HTML
615 lines
33 KiB
HTML
<!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: eoPop< EOT > Class Template 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>eoPop< EOT > Class Template Reference</h1>A std::vector of <a class="el" href="class_e_o.html">EO</a> object, to be used in all algorithms (selectors, operators, replacements, ...).
|
|
<a href="#_details">More...</a>
|
|
<p>
|
|
<code>#include <<a class="el" href="eo_pop_8h-source.html">eoPop.h</a>></code>
|
|
<p>
|
|
<p>Inheritance diagram for eoPop< EOT >:
|
|
<p><center><img src="classeo_pop.png" usemap="#eoPop< EOT >_map" border="0" alt=""></center>
|
|
<map name="eoPop< EOT >_map">
|
|
<area href="classeo_object.html" alt="eoObject" shape="rect" coords="0,56,97,80">
|
|
<area href="classeo_persistent.html" alt="eoPersistent" shape="rect" coords="107,56,204,80">
|
|
<area href="classeo_printable.html" alt="eoPrintable" shape="rect" coords="107,0,204,24">
|
|
</map>
|
|
<a href="classeo_pop-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 Types</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w0" doxytag="eoPop::Fitness"></a>
|
|
typedef EOT::Fitness </td><td class="memItemRight" valign="bottom"><b>Fitness</b></td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="w1" doxytag="eoPop::fitness_traits"></a>
|
|
typedef EOT::fitness_traits </td><td class="memItemRight" valign="bottom"><b>fitness_traits</b></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_pop.html#a0">eoPop</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Default ctor. <a href="#a0"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a1">eoPop</a> (unsigned _popSize, <a class="el" href="classeo_init.html">eoInit</a>< <a class="el" href="struct_dummy.html">EOT</a> > &_chromInit)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Ctor for the initialization of chromosomes. <a href="#a1"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a2">append</a> (unsigned _newPopSize, <a class="el" href="classeo_init.html">eoInit</a>< <a class="el" href="struct_dummy.html">EOT</a> > &_chromInit)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">appstd::ends random guys at end of pop. <a href="#a2"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a3">eoPop</a> (std::istream &_is)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Ctor from an std::istream; reads the population from a stream, each element should be in different lines. <a href="#a3"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="eoPop::~eoPop"></a>
|
|
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a4">~eoPop</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Empty Dtor. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a5">sort</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">sort the population. <a href="#a5"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6" doxytag="eoPop::sort"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a6">sort</a> (std::vector< const <a class="el" href="struct_dummy.html">EOT</a> * > &result) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">creates a std::vector<EOT*> pointing to the individuals in descending order <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a7">shuffle</a> (void)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">shuffle the population. <a href="#a7"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8" doxytag="eoPop::shuffle"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a8">shuffle</a> (std::vector< const <a class="el" href="struct_dummy.html">EOT</a> * > &result) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">creates a std::vector<EOT*> pointing to the individuals in random order <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9" doxytag="eoPop::it_best_element"></a>
|
|
<a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a9">it_best_element</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns an iterator to the best individual DOES NOT MOVE ANYBODY <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10" doxytag="eoPop::best_element"></a>
|
|
const <a class="el" href="struct_dummy.html">EOT</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a10">best_element</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns an iterator to the best individual DOES NOT MOVE ANYBODY <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a11" doxytag="eoPop::worse_element"></a>
|
|
const <a class="el" href="struct_dummy.html">EOT</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a11">worse_element</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns a const reference to the worse individual DOES NOT MOVE ANYBODY <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12" doxytag="eoPop::it_worse_element"></a>
|
|
<a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a12">it_worse_element</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns an iterator to the worse individual DOES NOT MOVE ANYBODY <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::iterator </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a13">nth_element</a> (int nth)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">slightly faster algorithm than sort to find all individuals that are better than the nth individual. <a href="#a13"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a14" doxytag="eoPop::nth_element_fitness"></a>
|
|
Fitness </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a14">nth_element_fitness</a> (int which) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns the fitness of the nth element <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a15" doxytag="eoPop::nth_element"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a15">nth_element</a> (int which, std::vector< const <a class="el" href="struct_dummy.html">EOT</a> * > &result) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">const nth_element function, returns pointers to sorted individuals up the the nth <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a16" doxytag="eoPop::swap"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#a16">swap</a> (<a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> > &other)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">does STL swap with other pop <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_pop.html#a17">sortedPrintOn</a> (std::ostream &_os) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Prints sorted pop but does NOT modify it! <a href="#a17"></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_pop.html#a18">printOn</a> (std::ostream &_os) const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write object. <a href="#a18"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a19" doxytag="eoPop::invalidate"></a>
|
|
virtual void </td><td class="memItemRight" valign="bottom"><b>invalidate</b> ()</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a21" doxytag="eoPop::sort"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><b>sort</b> ()</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a22" doxytag="eoPop::scale"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><b>scale</b> ()</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a23" doxytag="eoPop::setPerf2Worth"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><b>setPerf2Worth</b> (<a class="el" href="classeo_perf2_worth.html">eoPerf2Worth</a>< <a class="el" href="struct_dummy.html">EOT</a> > &_p2w)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a24" doxytag="eoPop::setPerf2Worth"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><b>setPerf2Worth</b> (<a class="el" href="classeo_perf2_worth.html">eoPerf2Worth</a>< <a class="el" href="struct_dummy.html">EOT</a> > *_p2w)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a25" doxytag="eoPop::getPerf2Worth"></a>
|
|
<a class="el" href="classeo_perf2_worth.html">eoPerf2Worth</a>< <a class="el" href="struct_dummy.html">EOT</a> > * </td><td class="memItemRight" valign="bottom"><b>getPerf2Worth</b> ()</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a26" doxytag="eoPop::swap"></a>
|
|
void </td><td class="memItemRight" valign="bottom"><b>swap</b> (<a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> > &other)</td></tr>
|
|
|
|
<tr><td colspan="2"><div class="groupHeader">Methods from eoObject</div></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#z19_0">readFrom</a> (std::istream &_is)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Read object. <a href="#z19_0"></a><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_pop.html#z19_1">className</a> () const </td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Inherited from <a class="el" href="classeo_object.html">eoObject</a>. <a href="#z19_1"></a><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="eoPop::p2w"></a>
|
|
<a class="el" href="classeo_perf2_worth.html">eoPerf2Worth</a>< <a class="el" href="struct_dummy.html">EOT</a> > * </td><td class="memItemRight" valign="bottom"><b>p2w</b></td></tr>
|
|
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
<h3>template<class EOT><br>
|
|
class eoPop< EOT ></h3>
|
|
|
|
A std::vector of <a class="el" href="class_e_o.html">EO</a> object, to be used in all algorithms (selectors, operators, replacements, ...).
|
|
<p>
|
|
We have no idea if a population can be some other thing that a std::vector, but if somebody thinks of it, this concrete implementation can be moved to "generic" and an abstract Population interface be provided.<p>
|
|
The template can be instantiated with anything that accepts a "size" and <a class="el" href="classeo_init.html">eoInit</a> derived object. in the ctor. EOT must also have a copy ctor, since temporaries are created and then passed to the <a class="el" href="classeo_init.html">eoInit</a> object
|
|
<p>
|
|
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00054">54</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>.<hr><h2>Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" name="a0" doxytag="eoPop::eoPop"></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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top"><a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::<a class="el" href="classeo_pop.html">eoPop</a> </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="mdname1" valign="top" nowrap> </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>
|
|
Default ctor.
|
|
<p>
|
|
Creates empty pop
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00068">68</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a1" doxytag="eoPop::eoPop"></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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top"><a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::<a class="el" href="classeo_pop.html">eoPop</a> </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">unsigned </td>
|
|
<td class="mdname" nowrap> <em>_popSize</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap><a class="el" href="classeo_init.html">eoInit</a>< <a class="el" href="struct_dummy.html">EOT</a> > & </td>
|
|
<td class="mdname" nowrap> <em>_chromInit</em></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>
|
|
Ctor for the initialization of chromosomes.
|
|
<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>_popSize</em> </td><td>total population size </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>_chromInit</em> </td><td>Initialization routine, produces EO's, needs to be an <a class="el" href="classeo_init.html">eoInit</a></td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00075">75</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a3" doxytag="eoPop::eoPop"></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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top"><a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::<a class="el" href="classeo_pop.html">eoPop</a> </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]</code></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Ctor from an std::istream; reads the population from a stream, each element should be in different lines.
|
|
<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>the stream </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00113">113</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="a2" doxytag="eoPop::append"></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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void <a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::append </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">unsigned </td>
|
|
<td class="mdname" nowrap> <em>_newPopSize</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap><a class="el" href="classeo_init.html">eoInit</a>< <a class="el" href="struct_dummy.html">EOT</a> > & </td>
|
|
<td class="mdname" nowrap> <em>_chromInit</em></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>
|
|
appstd::ends random guys at end of pop.
|
|
<p>
|
|
Can be used to initialize it pop is empty<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>_popSize</em> </td><td>total population size </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>_chromInit</em> </td><td>Initialization routine, produces EO's, needs to be an <a class="el" href="classeo_init.html">eoInit</a></td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00091">91</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>.
|
|
<p>
|
|
Referenced by <a class="el" href="eo_easy_e_a_8h-source.html#l00172">eoEasyEA< EOT >::operator()()</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a5" doxytag="eoPop::sort"></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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void <a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::sort </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">void </td>
|
|
<td class="mdname1" valign="top" nowrap> </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>
|
|
sort the population.
|
|
<p>
|
|
Use this member to sort in order of descending Fitness, so the first individual is the best!
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00133">133</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>.
|
|
<p>
|
|
Referenced by <a class="el" href="eo_truncated_select_many_8h-source.html#l00077">eoTruncatedSelectMany< EOT >::operator()()</a>, <a class="el" href="eo_reduce_merge_reduce_8h-source.html#l00068">eoReduceMergeReduce< EOT >::operator()()</a>, <a class="el" href="eo_ranking_8h-source.html#l00067">eoRanking< EOT >::operator()()</a>, <a class="el" href="eo_p_b_i_l_additive_8h-source.html#l00078">eoPBILAdditive< EOT >::operator()()</a>, <a class="el" href="eo_check_point_8h-source.html#l00076">eoCheckPoint< EOT >::operator()()</a>, <a class="el" href="eo_sequential_select_8h-source.html#l00061">eoSequentialSelect< EOT >::setup()</a>, and <a class="el" href="eo_pop_8h-source.html#l00247">eoPop< Dummy >::sortedPrintOn()</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a7" doxytag="eoPop::shuffle"></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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void <a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::shuffle </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">void </td>
|
|
<td class="mdname1" valign="top" nowrap> </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>
|
|
shuffle the population.
|
|
<p>
|
|
Use this member to put the population in random order
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00152">152</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>.
|
|
<p>
|
|
Referenced by <a class="el" href="eo_truncated_select_many_8h-source.html#l00077">eoTruncatedSelectMany< EOT >::operator()()</a>, <a class="el" href="eo_reduce_split_8h-source.html#l00134">eoRandomSplit< EOT >::operator()()</a>, <a class="el" href="eo_reduce_8h-source.html#l00066">eoRandomReduce< EOT >::operator()()</a>, <a class="el" href="eo_sequential_select_8h-source.html#l00106">eoEliteSequentialSelect< EOT >::setup()</a>, and <a class="el" href="eo_sequential_select_8h-source.html#l00061">eoSequentialSelect< EOT >::setup()</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a13" doxytag="eoPop::nth_element"></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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top"><a class="el" href="classeo_pop.html">eoPop</a><<a class="el" href="struct_dummy.html">EOT</a>>::iterator <a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::nth_element </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">int </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>nth</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>
|
|
slightly faster algorithm than sort to find all individuals that are better than the nth individual.
|
|
<p>
|
|
INDIVIDUALS ARE MOVED AROUND in the pop.
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00201">201</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>.
|
|
<p>
|
|
Referenced by <a class="el" href="eo_survive_and_die_8h-source.html#l00086">eoDeterministicSurviveAndDie< EOT >::operator()()</a>, <a class="el" href="eo_reduce_split_8h-source.html#l00057">eoTruncateSplit< EOT >::operator()()</a>, <a class="el" href="eo_reduce_merge_reduce_8h-source.html#l00068">eoReduceMergeReduce< EOT >::operator()()</a>, <a class="el" href="eo_reduce_8h-source.html#l00051">eoTruncate< EOT >::operator()()</a>, <a class="el" href="eo_merge_8h-source.html#l00077">eoElitism< EOT >::operator()()</a>, and <a class="el" href="eo_truncated_select_one_8h-source.html#l00066">eoTruncatedSelectOne< EOT >::setup()</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a17" doxytag="eoPop::sortedPrintOn"></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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top">virtual void <a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::sortedPrintOn </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>
|
|
Prints sorted pop but does NOT modify it!
|
|
<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>_os</em> </td><td>A std::ostream. </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00247">247</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a18" doxytag="eoPop::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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top">virtual void <a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::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_pop_8h-source.html#l00262">262</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="z19_0" doxytag="eoPop::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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top">virtual void <a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::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>
|
|
The EOT class must have a ctor from 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>_is</em> </td><td>A std::istream. </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_pop_8h-source.html#l00274">274</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>.
|
|
<p>
|
|
Referenced by <a class="el" href="eo_pop_8h-source.html#l00113">eoPop< Dummy >::eoPop()</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="z19_1" doxytag="eoPop::className"></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" colspan="4">
|
|
template<class EOT> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap valign="top">virtual std::string <a class="el" href="classeo_pop.html">eoPop</a>< <a class="el" href="struct_dummy.html">EOT</a> >::className </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">void </td>
|
|
<td class="mdname1" valign="top" nowrap> </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>
|
|
Inherited from <a class="el" href="classeo_object.html">eoObject</a>.
|
|
<p>
|
|
Returns the class name. <dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classeo_object.html">eoObject</a> </dd></dl>
|
|
|
|
<p>
|
|
Implements <a class="el" href="classeo_object.html#a1">eoObject</a>.
|
|
<p>
|
|
Definition at line <a class="el" href="eo_pop_8h-source.html#l00289">289</a> of file <a class="el" href="eo_pop_8h-source.html">eoPop.h</a>.
|
|
<p>
|
|
Referenced by <a class="el" href="eo_check_point_8h-source.html#l00130">eoCheckPoint< EOT >::allClassNames()</a>. </td>
|
|
</tr>
|
|
</table>
|
|
<hr>The documentation for this class was generated from the following files:<ul>
|
|
<li><a class="el" href="eo_pop_8h-source.html">eoPop.h</a><li><a class="el" href="fitness__traits_8cpp-source.html">fitness_traits.cpp</a></ul>
|
|
<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 19 05:06:53 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>
|