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
156
trunk/paradiseo-eo/doc/html/eo_init_8h-source.html
Normal file
156
trunk/paradiseo-eo/doc/html/eo_init_8h-source.html
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
<!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: eoInit.h Source File</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>
|
||||
<div class="nav">
|
||||
<a class="el" href="dir_000000.html">src</a></div>
|
||||
<h1>eoInit.h</h1><div class="fragment"><pre class="fragment">00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
00002
|
||||
00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
00004 <span class="comment">// eoInit.h</span>
|
||||
00005 <span class="comment">// (c) Maarten Keijzer 2000, GeNeura Team, 2000</span>
|
||||
00006 <span class="comment">/*</span>
|
||||
00007 <span class="comment"> This library is free software; you can redistribute it and/or</span>
|
||||
00008 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
|
||||
00009 <span class="comment"> License as published by the Free Software Foundation; either</span>
|
||||
00010 <span class="comment"> version 2 of the License, or (at your option) any later version.</span>
|
||||
00011 <span class="comment"></span>
|
||||
00012 <span class="comment"> This library is distributed in the hope that it will be useful,</span>
|
||||
00013 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
|
||||
00014 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
|
||||
00015 <span class="comment"> Lesser General Public License for more details.</span>
|
||||
00016 <span class="comment"></span>
|
||||
00017 <span class="comment"> You should have received a copy of the GNU Lesser General Public</span>
|
||||
00018 <span class="comment"> License along with this library; if not, write to the Free Software</span>
|
||||
00019 <span class="comment"> Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
|
||||
00020 <span class="comment"></span>
|
||||
00021 <span class="comment"> Contact: todos@geneura.ugr.es, http://geneura.ugr.es</span>
|
||||
00022 <span class="comment"> Marc.Schoenauer@polytechnique.fr</span>
|
||||
00023 <span class="comment"> mak@dhi.dk</span>
|
||||
00024 <span class="comment"> */</span>
|
||||
00025 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
00026
|
||||
00027 <span class="preprocessor">#ifndef _eoInit_H</span>
|
||||
00028 <span class="preprocessor"></span><span class="preprocessor">#define _eoInit_H</span>
|
||||
00029 <span class="preprocessor"></span>
|
||||
00030 <span class="preprocessor">#include <algorithm></span>
|
||||
00031
|
||||
00032 <span class="preprocessor">#include <eoOp.h></span>
|
||||
00033 <span class="preprocessor">#include <eoSTLFunctor.h></span>
|
||||
00034 <span class="preprocessor">#include <utils/eoRndGenerators.h></span>
|
||||
00035
|
||||
00044 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
<a name="l00045"></a><a class="code" href="classeo_init.html">00045</a> <span class="keyword">class </span><a class="code" href="classeo_init.html">eoInit</a> : <span class="keyword">public</span> <a class="code" href="classeo_u_f.html">eoUF</a><EOT&, void>
|
||||
00046 {
|
||||
00047 <span class="keyword">public</span>:
|
||||
00048
|
||||
<a name="l00052"></a><a class="code" href="classeo_init.html#a0">00052</a> <span class="keyword">virtual</span> std::string <a class="code" href="classeo_init.html#a0">className</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="stringliteral">"eoInit"</span>; }
|
||||
00053 };
|
||||
00054
|
||||
00059 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
<a name="l00060"></a><a class="code" href="classeo_init_generator.html">00060</a> <span class="keyword">class </span><a class="code" href="classeo_init_generator.html">eoInitGenerator</a> : <span class="keyword">public</span> <a class="code" href="classeo_f.html">eoF</a><EOT>
|
||||
00061 {
|
||||
00062 <span class="keyword">public</span>:
|
||||
00063
|
||||
<a name="l00065"></a><a class="code" href="classeo_init_generator.html#a0">00065</a> <a class="code" href="classeo_init_generator.html#a0">eoInitGenerator</a>(<a class="code" href="classeo_init.html">eoInit<EOT></a> & _init):init(_init) {}
|
||||
00066
|
||||
<a name="l00067"></a><a class="code" href="classeo_init_generator.html#a1">00067</a> <span class="keyword">virtual</span> <a class="code" href="struct_dummy.html">EOT</a> <a class="code" href="classeo_init_generator.html#a1">operator()</a>()
|
||||
00068 {
|
||||
00069 <a class="code" href="struct_dummy.html">EOT</a> p;
|
||||
00070 init(p);
|
||||
00071 <span class="keywordflow">return</span> (p);
|
||||
00072 }
|
||||
00073 <span class="keyword">private</span>:
|
||||
00074 <a class="code" href="classeo_init.html">eoInit<EOT></a> & init;
|
||||
00075 };
|
||||
00076
|
||||
00080 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
<a name="l00081"></a><a class="code" href="classeo_init_fixed_length.html">00081</a> <span class="keyword">class </span><a class="code" href="classeo_init_fixed_length.html">eoInitFixedLength</a>: <span class="keyword">public</span> <a class="code" href="classeo_init.html">eoInit</a><EOT>
|
||||
00082 {
|
||||
00083 <span class="keyword">public</span>:
|
||||
00084
|
||||
00085 <span class="keyword">typedef</span> <span class="keyword">typename</span> EOT::AtomType AtomType;
|
||||
00086
|
||||
00087 <a class="code" href="classeo_init_fixed_length.html">eoInitFixedLength</a>(<span class="keywordtype">unsigned</span> _combien, <a class="code" href="classeo_rnd_generator.html">eoRndGenerator<AtomType></a>& _generator)
|
||||
00088 : combien(_combien), <a class="code" href="classeo_init_fixed_length.html#r1">generator</a>(_generator) {}
|
||||
00089
|
||||
<a name="l00090"></a><a class="code" href="classeo_init_fixed_length.html#a1">00090</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classeo_init_fixed_length.html#a1">operator()</a>(<a class="code" href="struct_dummy.html">EOT</a>& chrom)
|
||||
00091 {
|
||||
00092 chrom.resize(combien);
|
||||
00093 std::generate(chrom.begin(), chrom.end(), generator);
|
||||
00094 chrom.<a class="code" href="class_e_o.html#a3">invalidate</a>();
|
||||
00095 }
|
||||
00096
|
||||
00097 <span class="keyword">private</span> :
|
||||
00098 <span class="keywordtype">unsigned</span> combien;
|
||||
<a name="l00100"></a><a class="code" href="classeo_init_fixed_length.html#r1">00100</a> <a class="code" href="classeo_s_t_l_f.html">eoSTLF<AtomType></a> generator;
|
||||
00101 };
|
||||
00102
|
||||
00106 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
<a name="l00107"></a><a class="code" href="classeo_init_variable_length.html">00107</a> <span class="keyword">class </span><a class="code" href="classeo_init_variable_length.html">eoInitVariableLength</a>: <span class="keyword">public</span> <a class="code" href="classeo_init.html">eoInit</a><EOT>
|
||||
00108 {
|
||||
00109 <span class="keyword">public</span>:
|
||||
00110 <span class="keyword">typedef</span> <span class="keyword">typename</span> EOT::AtomType AtomType;
|
||||
00111
|
||||
00112 <span class="comment">// /** Ctor from a generator */</span>
|
||||
00113 <span class="comment">// eoInitVariableLength(unsigned _minSize, unsigned _maxSize, eoF<typename EOT::AtomType> & _generator = Gen())</span>
|
||||
00114 <span class="comment">// : offset(_minSize), extent(_maxSize - _minSize), </span>
|
||||
00115 <span class="comment">// repGenerator( eoInitGenerator<typename EOT::AtomType>(*(new eoInit<EOT>)) ), </span>
|
||||
00116 <span class="comment">// generator(_generator)</span>
|
||||
00117 <span class="comment">// {</span>
|
||||
00118 <span class="comment">// if (_minSize >= _maxSize)</span>
|
||||
00119 <span class="comment">// throw std::logic_error("eoInitVariableLength: minSize larger or equal to maxSize");</span>
|
||||
00120 <span class="comment">// }</span>
|
||||
00121
|
||||
<a name="l00123"></a><a class="code" href="classeo_init_variable_length.html#a0">00123</a> <a class="code" href="classeo_init_variable_length.html#a0">eoInitVariableLength</a>(<span class="keywordtype">unsigned</span> _minSize, <span class="keywordtype">unsigned</span> _maxSize, <a class="code" href="classeo_init.html">eoInit<AtomType></a> & _init)
|
||||
00124 : offset(_minSize), extent(_maxSize - _minSize), init(_init)
|
||||
00125 {
|
||||
00126 <span class="keywordflow">if</span> (_minSize >= _maxSize)
|
||||
00127 <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">"eoInitVariableLength: minSize larger or equal to maxSize"</span>);
|
||||
00128 }
|
||||
00129
|
||||
00130
|
||||
<a name="l00131"></a><a class="code" href="classeo_init_variable_length.html#a1">00131</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classeo_init_variable_length.html#a1">operator()</a>(<a class="code" href="struct_dummy.html">EOT</a>& _chrom)
|
||||
00132 {
|
||||
00133 _chrom.resize(offset + rng.<a class="code" href="classeo_rng.html#a5">random</a>(extent));
|
||||
00134 <span class="keyword">typename</span> std::vector<AtomType>::iterator it;
|
||||
00135 <span class="keywordflow">for</span> (it=_chrom.begin(); it<_chrom.end(); it++)
|
||||
00136 init(*it);
|
||||
00137 _chrom.<a class="code" href="class_e_o.html#a3">invalidate</a>();
|
||||
00138 }
|
||||
00139
|
||||
00140 <span class="comment">// accessor to the atom initializer (needed by operator constructs sometimes)</span>
|
||||
00141 <a class="code" href="classeo_init.html">eoInit<AtomType></a> & atomInit() {<span class="keywordflow">return</span> init;}
|
||||
00142
|
||||
00143 <span class="keyword">private</span> :
|
||||
00144 <span class="keywordtype">unsigned</span> offset;
|
||||
00145 <span class="keywordtype">unsigned</span> extent;
|
||||
00146 <a class="code" href="classeo_init.html">eoInit<AtomType></a> & init;
|
||||
00147 };
|
||||
00148
|
||||
00156 <span class="keyword">template</span> <<span class="keyword">class</span> EOT>
|
||||
<a name="l00157"></a><a class="code" href="classeo_init_adaptor.html">00157</a> <span class="keyword">class </span><a class="code" href="classeo_init_adaptor.html">eoInitAdaptor</a> : <span class="keyword">public</span> <a class="code" href="classeo_mon_op.html">eoMonOp</a><EOT>
|
||||
00158 {
|
||||
00159 <span class="keyword">public</span> :
|
||||
00160 <a class="code" href="classeo_init_adaptor.html">eoInitAdaptor</a>(<a class="code" href="classeo_init.html">eoInit<EOT></a>& _init) : init(_init) {}
|
||||
00161
|
||||
<a name="l00162"></a><a class="code" href="classeo_init_adaptor.html#a1">00162</a> <span class="keywordtype">bool</span> <a class="code" href="classeo_init_adaptor.html#a1">operator()</a>(<a class="code" href="struct_dummy.html">EOT</a>& _eot)
|
||||
00163 {
|
||||
00164 init(_eot);
|
||||
00165 <span class="keywordflow">return</span> <span class="keyword">true</span>;
|
||||
00166 }
|
||||
00167 <span class="keyword">private</span> :
|
||||
00168
|
||||
00169 <a class="code" href="classeo_init.html">eoInit<EOT></a>& init;
|
||||
00170 };
|
||||
00171
|
||||
00172 <span class="preprocessor">#endif</span>
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 19 05:06:36 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