git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@497 331e1502-861f-0410-8da2-ba01fb791d7f
88 lines
7.6 KiB
HTML
88 lines
7.6 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>ParadisEO-MOEO: moeoObjectiveVector.h Source File</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.4.7 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="main.html"><span>Main Page</span></a></li>
|
|
<li><a href="classes.html"><span>Classes</span></a></li>
|
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<form action="search.php" method="get">
|
|
<table cellspacing="0" cellpadding="0" border="0">
|
|
<tr>
|
|
<td><label> <u>S</u>earch for </label></td>
|
|
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</li>
|
|
</ul></div>
|
|
<h1>moeoObjectiveVector.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
|
<a name="l00002"></a>00002
|
|
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
|
<a name="l00004"></a>00004 <span class="comment">// moeoObjectiveVector.h</span>
|
|
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
|
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
|
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
|
<a name="l00008"></a>00008 <span class="comment"></span>
|
|
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
|
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
|
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
|
<a name="l00012"></a>00012
|
|
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef MOEOOBJECTIVEVECTOR_H_</span>
|
|
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define MOEOOBJECTIVEVECTOR_H_</span>
|
|
<a name="l00015"></a>00015 <span class="preprocessor"></span>
|
|
<a name="l00016"></a>00016 <span class="preprocessor">#include <vector></span>
|
|
<a name="l00017"></a>00017
|
|
<a name="l00024"></a>00024 <span class="keyword">template</span> < <span class="keyword">class</span> ObjectiveVectorTraits, <span class="keyword">class</span> ObjectiveVectorType >
|
|
<a name="l00025"></a><a class="code" href="classmoeoObjectiveVector.html">00025</a> <span class="keyword">class </span><a class="code" href="classmoeoObjectiveVector.html">moeoObjectiveVector</a> : <span class="keyword">public</span> std::vector < ObjectiveVectorType >
|
|
<a name="l00026"></a>00026 {
|
|
<a name="l00027"></a>00027 <span class="keyword">public</span>:
|
|
<a name="l00028"></a>00028
|
|
<a name="l00030"></a><a class="code" href="classmoeoObjectiveVector.html#21ee0475420b613951b96a550e814fbb">00030</a> <span class="keyword">typedef</span> ObjectiveVectorTraits <a class="code" href="classmoeoObjectiveVector.html#21ee0475420b613951b96a550e814fbb">Traits</a>;
|
|
<a name="l00032"></a><a class="code" href="classmoeoObjectiveVector.html#e86f199692cae43bc346be63130eb993">00032</a> <span class="keyword">typedef</span> ObjectiveVectorType <a class="code" href="classmoeoObjectiveVector.html#e86f199692cae43bc346be63130eb993">Type</a>;
|
|
<a name="l00033"></a>00033
|
|
<a name="l00034"></a>00034
|
|
<a name="l00038"></a><a class="code" href="classmoeoObjectiveVector.html#084e9d2cecbf9ea66e4b68537457109f">00038</a> <a class="code" href="classmoeoObjectiveVector.html#084e9d2cecbf9ea66e4b68537457109f">moeoObjectiveVector</a>(<a class="code" href="classmoeoObjectiveVector.html#e86f199692cae43bc346be63130eb993">Type</a> _value = <a class="code" href="classmoeoObjectiveVector.html#e86f199692cae43bc346be63130eb993">Type</a>()) : std::vector < <a class="code" href="classmoeoObjectiveVector.html#e86f199692cae43bc346be63130eb993">Type</a> > (ObjectiveVectorTraits::<a class="code" href="classmoeoObjectiveVector.html#4c9a17116e0a95b4e3191f299e10fc9d">nObjectives</a>(), _value)
|
|
<a name="l00039"></a>00039 {}
|
|
<a name="l00040"></a>00040
|
|
<a name="l00041"></a>00041
|
|
<a name="l00046"></a><a class="code" href="classmoeoObjectiveVector.html#c504cb6a2086a80aaaf41978032c8ce7">00046</a> <a class="code" href="classmoeoObjectiveVector.html#084e9d2cecbf9ea66e4b68537457109f">moeoObjectiveVector</a>(std::vector < Type > & _v) : std::vector < <a class="code" href="classmoeoObjectiveVector.html#e86f199692cae43bc346be63130eb993">Type</a> > (_v)
|
|
<a name="l00047"></a>00047 {}
|
|
<a name="l00048"></a>00048
|
|
<a name="l00049"></a>00049
|
|
<a name="l00055"></a><a class="code" href="classmoeoObjectiveVector.html#0593e2d91be697d9b255513236cb207f">00055</a> <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classmoeoObjectiveVector.html#0593e2d91be697d9b255513236cb207f">setup</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _nObjectives, std::vector < bool > & _bObjectives)
|
|
<a name="l00056"></a>00056 {
|
|
<a name="l00057"></a>00057 ObjectiveVectorTraits::setup(_nObjectives, _bObjectives);
|
|
<a name="l00058"></a>00058 }
|
|
<a name="l00059"></a>00059
|
|
<a name="l00060"></a>00060
|
|
<a name="l00064"></a><a class="code" href="classmoeoObjectiveVector.html#4c9a17116e0a95b4e3191f299e10fc9d">00064</a> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classmoeoObjectiveVector.html#4c9a17116e0a95b4e3191f299e10fc9d">nObjectives</a>()
|
|
<a name="l00065"></a>00065 {
|
|
<a name="l00066"></a>00066 <span class="keywordflow">return</span> ObjectiveVectorTraits::nObjectives();
|
|
<a name="l00067"></a>00067 }
|
|
<a name="l00068"></a>00068
|
|
<a name="l00069"></a>00069
|
|
<a name="l00074"></a><a class="code" href="classmoeoObjectiveVector.html#decaf6e3b9a9ac97461d2b271facfc5f">00074</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classmoeoObjectiveVector.html#decaf6e3b9a9ac97461d2b271facfc5f">minimizing</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _i)
|
|
<a name="l00075"></a>00075 {
|
|
<a name="l00076"></a>00076 <span class="keywordflow">return</span> ObjectiveVectorTraits::minimizing(_i);
|
|
<a name="l00077"></a>00077 }
|
|
<a name="l00078"></a>00078
|
|
<a name="l00079"></a>00079
|
|
<a name="l00084"></a><a class="code" href="classmoeoObjectiveVector.html#b62231b0e1c6bb6bab43d6d058871ce3">00084</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classmoeoObjectiveVector.html#b62231b0e1c6bb6bab43d6d058871ce3">maximizing</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _i)
|
|
<a name="l00085"></a>00085 {
|
|
<a name="l00086"></a>00086 <span class="keywordflow">return</span> ObjectiveVectorTraits::maximizing(_i);
|
|
<a name="l00087"></a>00087 }
|
|
<a name="l00088"></a>00088
|
|
<a name="l00089"></a>00089 };
|
|
<a name="l00090"></a>00090
|
|
<a name="l00091"></a>00091 <span class="preprocessor">#endif </span><span class="comment">/*MOEOOBJECTIVEVECTOR_H_*/</span>
|
|
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 2 16:05:01 2007 for ParadisEO-MOEO by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
|
</body>
|
|
</html>
|