git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@139 331e1502-861f-0410-8da2-ba01fb791d7f
193
trunk/paradiseo-peo/docs/html/lesson1/html/doclsn_8h-source.html
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
<!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-PEO Lesson1: doclsn.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 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>doclsn.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003
|
||||
<a name="l00004"></a>00004
|
||||
<a name="l00005"></a>00005
|
||||
<a name="l00006"></a>00006
|
||||
<a name="l00007"></a>00007
|
||||
<a name="l00008"></a>00008
|
||||
<a name="l00009"></a>00009
|
||||
<a name="l00010"></a>00010
|
||||
<a name="l00011"></a>00011
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013
|
||||
<a name="l00014"></a>00014
|
||||
<a name="l00015"></a>00015
|
||||
<a name="l00016"></a>00016
|
||||
<a name="l00017"></a>00017
|
||||
<a name="l00018"></a>00018
|
||||
<a name="l00019"></a>00019
|
||||
<a name="l00020"></a>00020
|
||||
<a name="l00021"></a>00021
|
||||
<a name="l00022"></a>00022
|
||||
<a name="l00023"></a>00023
|
||||
<a name="l00024"></a>00024
|
||||
<a name="l00025"></a>00025
|
||||
<a name="l00026"></a>00026
|
||||
<a name="l00027"></a>00027
|
||||
<a name="l00028"></a>00028
|
||||
<a name="l00029"></a>00029
|
||||
<a name="l00030"></a>00030
|
||||
<a name="l00031"></a>00031
|
||||
<a name="l00032"></a>00032
|
||||
<a name="l00033"></a>00033
|
||||
<a name="l00034"></a>00034
|
||||
<a name="l00035"></a>00035
|
||||
<a name="l00036"></a>00036
|
||||
<a name="l00037"></a>00037
|
||||
<a name="l00038"></a>00038
|
||||
<a name="l00039"></a>00039
|
||||
<a name="l00040"></a>00040
|
||||
<a name="l00041"></a>00041
|
||||
<a name="l00042"></a>00042
|
||||
<a name="l00043"></a>00043
|
||||
<a name="l00044"></a>00044
|
||||
<a name="l00045"></a>00045
|
||||
<a name="l00046"></a>00046
|
||||
<a name="l00047"></a>00047
|
||||
<a name="l00048"></a>00048
|
||||
<a name="l00049"></a>00049
|
||||
<a name="l00050"></a>00050
|
||||
<a name="l00051"></a>00051
|
||||
<a name="l00052"></a>00052
|
||||
<a name="l00053"></a>00053
|
||||
<a name="l00054"></a>00054
|
||||
<a name="l00055"></a>00055
|
||||
<a name="l00056"></a>00056
|
||||
<a name="l00057"></a>00057
|
||||
<a name="l00058"></a>00058
|
||||
<a name="l00059"></a>00059
|
||||
<a name="l00060"></a>00060
|
||||
<a name="l00061"></a>00061
|
||||
<a name="l00062"></a>00062
|
||||
<a name="l00063"></a>00063
|
||||
<a name="l00064"></a>00064
|
||||
<a name="l00065"></a>00065
|
||||
<a name="l00066"></a>00066
|
||||
<a name="l00067"></a>00067
|
||||
<a name="l00068"></a>00068
|
||||
<a name="l00069"></a>00069
|
||||
<a name="l00070"></a>00070
|
||||
<a name="l00071"></a>00071
|
||||
<a name="l00072"></a>00072
|
||||
<a name="l00073"></a>00073
|
||||
<a name="l00074"></a>00074
|
||||
<a name="l00075"></a>00075
|
||||
<a name="l00076"></a>00076
|
||||
<a name="l00077"></a>00077
|
||||
<a name="l00078"></a>00078
|
||||
<a name="l00079"></a>00079
|
||||
<a name="l00080"></a>00080
|
||||
<a name="l00081"></a>00081
|
||||
<a name="l00082"></a>00082
|
||||
<a name="l00083"></a>00083
|
||||
<a name="l00084"></a>00084
|
||||
<a name="l00085"></a>00085
|
||||
<a name="l00086"></a>00086
|
||||
<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
|
||||
<a name="l00092"></a>00092
|
||||
<a name="l00093"></a>00093
|
||||
<a name="l00094"></a>00094
|
||||
<a name="l00095"></a>00095
|
||||
<a name="l00096"></a>00096
|
||||
<a name="l00097"></a>00097
|
||||
<a name="l00098"></a>00098
|
||||
<a name="l00099"></a>00099
|
||||
<a name="l00100"></a>00100
|
||||
<a name="l00101"></a>00101
|
||||
<a name="l00102"></a>00102
|
||||
<a name="l00103"></a>00103
|
||||
<a name="l00104"></a>00104
|
||||
<a name="l00105"></a>00105
|
||||
<a name="l00106"></a>00106
|
||||
<a name="l00107"></a>00107
|
||||
<a name="l00108"></a>00108
|
||||
<a name="l00109"></a>00109
|
||||
<a name="l00110"></a>00110
|
||||
<a name="l00111"></a>00111
|
||||
<a name="l00112"></a>00112
|
||||
<a name="l00113"></a>00113
|
||||
<a name="l00114"></a>00114
|
||||
<a name="l00115"></a>00115
|
||||
<a name="l00116"></a>00116
|
||||
<a name="l00117"></a>00117
|
||||
<a name="l00118"></a>00118
|
||||
<a name="l00119"></a>00119
|
||||
<a name="l00120"></a>00120
|
||||
<a name="l00121"></a>00121
|
||||
<a name="l00122"></a>00122
|
||||
<a name="l00123"></a>00123
|
||||
<a name="l00124"></a>00124
|
||||
<a name="l00125"></a>00125
|
||||
<a name="l00126"></a>00126
|
||||
<a name="l00127"></a>00127
|
||||
<a name="l00128"></a>00128
|
||||
<a name="l00129"></a>00129
|
||||
<a name="l00130"></a>00130
|
||||
<a name="l00131"></a>00131
|
||||
<a name="l00132"></a>00132
|
||||
<a name="l00133"></a>00133
|
||||
<a name="l00134"></a>00134
|
||||
<a name="l00135"></a>00135
|
||||
<a name="l00136"></a>00136
|
||||
<a name="l00137"></a>00137
|
||||
<a name="l00138"></a>00138
|
||||
<a name="l00139"></a>00139
|
||||
<a name="l00140"></a>00140
|
||||
<a name="l00141"></a>00141
|
||||
<a name="l00142"></a>00142
|
||||
<a name="l00143"></a>00143
|
||||
<a name="l00144"></a>00144
|
||||
<a name="l00145"></a>00145
|
||||
<a name="l00146"></a>00146
|
||||
<a name="l00147"></a>00147
|
||||
<a name="l00148"></a>00148
|
||||
<a name="l00149"></a>00149
|
||||
<a name="l00150"></a>00150
|
||||
<a name="l00151"></a>00151
|
||||
<a name="l00152"></a>00152
|
||||
<a name="l00153"></a>00153
|
||||
<a name="l00154"></a>00154
|
||||
<a name="l00155"></a>00155
|
||||
<a name="l00156"></a>00156
|
||||
<a name="l00157"></a>00157
|
||||
<a name="l00158"></a>00158
|
||||
<a name="l00159"></a>00159
|
||||
<a name="l00160"></a>00160
|
||||
<a name="l00161"></a>00161
|
||||
<a name="l00162"></a>00162
|
||||
<a name="l00163"></a>00163
|
||||
<a name="l00164"></a>00164
|
||||
<a name="l00165"></a>00165
|
||||
<a name="l00166"></a>00166
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Jan 7 18:35:29 2007 for ParadisEO-PEO Lesson1 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>
|
||||
358
trunk/paradiseo-peo/docs/html/lesson1/html/doxygen.css
Normal file
|
|
@ -0,0 +1,358 @@
|
|||
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
BODY,TD {
|
||||
font-size: 90%;
|
||||
}
|
||||
H1 {
|
||||
text-align: center;
|
||||
font-size: 160%;
|
||||
}
|
||||
H2 {
|
||||
font-size: 120%;
|
||||
}
|
||||
H3 {
|
||||
font-size: 100%;
|
||||
}
|
||||
CAPTION { font-weight: bold }
|
||||
DIV.qindex {
|
||||
width: 100%;
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
DIV.nav {
|
||||
width: 100%;
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
DIV.navtab {
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
padding: 2px;
|
||||
}
|
||||
TD.navtab {
|
||||
font-size: 70%;
|
||||
}
|
||||
A.qindex {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: #1A419D;
|
||||
}
|
||||
A.qindex:visited {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: #1A419D
|
||||
}
|
||||
A.qindex:hover {
|
||||
text-decoration: none;
|
||||
background-color: #ddddff;
|
||||
}
|
||||
A.qindexHL {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
border: 1px double #9295C2;
|
||||
}
|
||||
A.qindexHL:hover {
|
||||
text-decoration: none;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
}
|
||||
A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
|
||||
A.el { text-decoration: none; font-weight: bold }
|
||||
A.elRef { font-weight: bold }
|
||||
A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
|
||||
A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
|
||||
A.codeRef:link { font-weight: normal; color: #0000FF}
|
||||
A.codeRef:visited { font-weight: normal; color: #0000FF}
|
||||
A:hover { text-decoration: none; background-color: #f2f2ff }
|
||||
DL.el { margin-left: -1cm }
|
||||
.fragment {
|
||||
font-family: monospace, fixed;
|
||||
font-size: 95%;
|
||||
}
|
||||
PRE.fragment {
|
||||
border: 1px solid #CCCCCC;
|
||||
background-color: #f5f5f5;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
margin-left: 2px;
|
||||
margin-right: 8px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
|
||||
|
||||
DIV.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 6px;
|
||||
font-weight: bold;
|
||||
}
|
||||
DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
|
||||
BODY {
|
||||
background: white;
|
||||
color: black;
|
||||
margin-right: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
TD.indexkey {
|
||||
background-color: #e8eef2;
|
||||
font-weight: bold;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
TD.indexvalue {
|
||||
background-color: #e8eef2;
|
||||
font-style: italic;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
TR.memlist {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
P.formulaDsp { text-align: center; }
|
||||
IMG.formulaDsp { }
|
||||
IMG.formulaInl { vertical-align: middle; }
|
||||
SPAN.keyword { color: #008000 }
|
||||
SPAN.keywordtype { color: #604020 }
|
||||
SPAN.keywordflow { color: #e08000 }
|
||||
SPAN.comment { color: #800000 }
|
||||
SPAN.preprocessor { color: #806020 }
|
||||
SPAN.stringliteral { color: #002080 }
|
||||
SPAN.charliteral { color: #008080 }
|
||||
.mdescLeft {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.mdescRight {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.memItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplParams {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
color: #606060;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.search { color: #003399;
|
||||
font-weight: bold;
|
||||
}
|
||||
FORM.search {
|
||||
margin-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
INPUT.search { font-size: 75%;
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
background-color: #e8eef2;
|
||||
}
|
||||
TD.tiny { font-size: 75%;
|
||||
}
|
||||
a {
|
||||
color: #1A41A8;
|
||||
}
|
||||
a:visited {
|
||||
color: #2A3798;
|
||||
}
|
||||
.dirtab { padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #84b0c7;
|
||||
}
|
||||
TH.dirtab { background: #e8eef2;
|
||||
font-weight: bold;
|
||||
}
|
||||
HR { height: 1px;
|
||||
border: none;
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
/* Style for detailed member documentation */
|
||||
.memtemplate {
|
||||
font-size: 80%;
|
||||
color: #606060;
|
||||
font-weight: normal;
|
||||
}
|
||||
.memnav {
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
padding: 2px;
|
||||
}
|
||||
.memitem {
|
||||
padding: 4px;
|
||||
background-color: #eef3f5;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #dedeee;
|
||||
-moz-border-radius: 8px 8px 8px 8px;
|
||||
}
|
||||
.memname {
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
}
|
||||
.memdoc{
|
||||
padding-left: 10px;
|
||||
}
|
||||
.memproto {
|
||||
background-color: #d5e1e8;
|
||||
width: 100%;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #84b0c7;
|
||||
font-weight: bold;
|
||||
-moz-border-radius: 8px 8px 8px 8px;
|
||||
}
|
||||
.paramkey {
|
||||
text-align: right;
|
||||
}
|
||||
.paramtype {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.paramname {
|
||||
color: #602020;
|
||||
font-style: italic;
|
||||
}
|
||||
/* End Styling for detailed member documentation */
|
||||
|
||||
/* for the tree view */
|
||||
.ftvtree {
|
||||
font-family: sans-serif;
|
||||
margin:0.5em;
|
||||
}
|
||||
.directory { font-size: 9pt; font-weight: bold; }
|
||||
.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; }
|
||||
.directory > h3 { margin-top: 0; }
|
||||
.directory p { margin: 0px; white-space: nowrap; }
|
||||
.directory div { display: none; margin: 0px; }
|
||||
.directory img { vertical-align: -30%; }
|
||||
|
||||
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/doxygen.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
31
trunk/paradiseo-peo/docs/html/lesson1/html/files.html
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<!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-PEO Lesson1: File Index</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 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>ParadisEO-PEO Lesson1 File List</h1>Here is a list of all documented files with brief descriptions:<table>
|
||||
<tr><td class="indexkey"><b>doclsn.h</b> <a href="doclsn_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
|
||||
<tr><td class="indexkey"><b>main.cpp</b> <a href="main_8cpp-source.html">[code]</a></td><td class="indexvalue"></td></tr>
|
||||
</table>
|
||||
<hr size="1"><address style="align: right;"><small>Generated on Sun Jan 7 18:35:29 2007 for ParadisEO-PEO Lesson1 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>
|
||||
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2blank.png
Normal file
|
After Width: | Height: | Size: 174 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2doc.png
Normal file
|
After Width: | Height: | Size: 255 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2folderclosed.png
Normal file
|
After Width: | Height: | Size: 259 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2folderopen.png
Normal file
|
After Width: | Height: | Size: 261 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2lastnode.png
Normal file
|
After Width: | Height: | Size: 233 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2link.png
Normal file
|
After Width: | Height: | Size: 358 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2mlastnode.png
Normal file
|
After Width: | Height: | Size: 160 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2mnode.png
Normal file
|
After Width: | Height: | Size: 194 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2node.png
Normal file
|
After Width: | Height: | Size: 235 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2plastnode.png
Normal file
|
After Width: | Height: | Size: 165 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2pnode.png
Normal file
|
After Width: | Height: | Size: 200 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/ftv2vertline.png
Normal file
|
After Width: | Height: | Size: 229 B |
8
trunk/paradiseo-peo/docs/html/lesson1/html/index.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-PEO Lesson1</title></head>
|
||||
<frameset cols="250,*">
|
||||
<frame src="tree.html" name="treefrm">
|
||||
<frame src="main.html" name="basefrm">
|
||||
</frameset>
|
||||
</html>
|
||||
117
trunk/paradiseo-peo/docs/html/lesson1/html/installdox
Executable file
|
|
@ -0,0 +1,117 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
%subst = ( "eo.doxytag", "", "mo.doxytag", "", "paradiseo-peo.doxytag", "", "paradiseo-peo-lsn-shared.doxytag", "");
|
||||
$quiet = 0;
|
||||
|
||||
if (open(F,"search.cfg"))
|
||||
{
|
||||
$_=<F> ; s/[ \t\n]*$//g ; $subst{"_doc"} = $_;
|
||||
$_=<F> ; s/[ \t\n]*$//g ; $subst{"_cgi"} = $_;
|
||||
}
|
||||
|
||||
while ( @ARGV ) {
|
||||
$_ = shift @ARGV;
|
||||
if ( s/^-// ) {
|
||||
if ( /^l(.*)/ ) {
|
||||
$v = ($1 eq "") ? shift @ARGV : $1;
|
||||
($v =~ /\/$/) || ($v .= "/");
|
||||
$_ = $v;
|
||||
if ( /(.+)\@(.+)/ ) {
|
||||
if ( exists $subst{$1} ) {
|
||||
$subst{$1} = $2;
|
||||
} else {
|
||||
print STDERR "Unknown tag file $1 given with option -l\n";
|
||||
&usage();
|
||||
}
|
||||
} else {
|
||||
print STDERR "Argument $_ is invalid for option -l\n";
|
||||
&usage();
|
||||
}
|
||||
}
|
||||
elsif ( /^q/ ) {
|
||||
$quiet = 1;
|
||||
}
|
||||
elsif ( /^\?|^h/ ) {
|
||||
&usage();
|
||||
}
|
||||
else {
|
||||
print STDERR "Illegal option -$_\n";
|
||||
&usage();
|
||||
}
|
||||
}
|
||||
else {
|
||||
push (@files, $_ );
|
||||
}
|
||||
}
|
||||
|
||||
foreach $sub (keys %subst)
|
||||
{
|
||||
if ( $subst{$sub} eq "" )
|
||||
{
|
||||
print STDERR "No substitute given for tag file `$sub'\n";
|
||||
&usage();
|
||||
}
|
||||
elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" )
|
||||
{
|
||||
print "Substituting $subst{$sub} for each occurence of tag file $sub\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! @files ) {
|
||||
if (opendir(D,".")) {
|
||||
foreach $file ( readdir(D) ) {
|
||||
$match = ".html";
|
||||
next if ( $file =~ /^\.\.?$/ );
|
||||
($file =~ /$match/) && (push @files, $file);
|
||||
($file =~ "tree.js") && (push @files, $file);
|
||||
}
|
||||
closedir(D);
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! @files ) {
|
||||
print STDERR "Warning: No input files given and none found!\n";
|
||||
}
|
||||
|
||||
foreach $f (@files)
|
||||
{
|
||||
if ( ! $quiet ) {
|
||||
print "Editing: $f...\n";
|
||||
}
|
||||
$oldf = $f;
|
||||
$f .= ".bak";
|
||||
unless (rename $oldf,$f) {
|
||||
print STDERR "Error: cannot rename file $oldf\n";
|
||||
exit 1;
|
||||
}
|
||||
if (open(F,"<$f")) {
|
||||
unless (open(G,">$oldf")) {
|
||||
print STDERR "Error: opening file $oldf for writing\n";
|
||||
exit 1;
|
||||
}
|
||||
if ($oldf ne "tree.js") {
|
||||
while (<F>) {
|
||||
s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g;
|
||||
print G "$_";
|
||||
}
|
||||
}
|
||||
else {
|
||||
while (<F>) {
|
||||
s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g;
|
||||
print G "$_";
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
print STDERR "Warning file $f does not exist\n";
|
||||
}
|
||||
unlink $f;
|
||||
}
|
||||
|
||||
sub usage {
|
||||
print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n";
|
||||
print STDERR "Options:\n";
|
||||
print STDERR " -l tagfile\@linkName tag file + URL or directory \n";
|
||||
print STDERR " -q Quiet mode\n\n";
|
||||
exit 1;
|
||||
}
|
||||
157
trunk/paradiseo-peo/docs/html/lesson1/html/main.html
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
<!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-PEO Lesson1: Creating a simple ParadisEO-PEO Evolutionary Algorithm</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 id="current"><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><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>Creating a simple ParadisEO-PEO Evolutionary Algorithm</h1>
|
||||
<p>
|
||||
<h3 align="center">0.1 </h3><h2><a class="anchor" name="structure">
|
||||
Introduction</a></h2>
|
||||
One of the first steps in designing an evolutionary algorihtm using the ParadisEO-PEO framework consists in having a clear overview of the implemented algorithm. A brief pseudo-code description is offered bellow - the entire source code for the ParadisEO-PEO evolutionary algorithm is defined in the <b>peoEA.h</b> header file. The main elements to be considered when building an evolutionary algorithm are the transformation operators, i.e. crossover and mutation, the evaluation function, the continuation criterion and the selection and replacement strategy.<p>
|
||||
<table style="border:none; border-spacing:0px;text-align:left; vertical-align:top; font-size:8pt;" border="0" cellspacing="3" cellpadding="3">
|
||||
<tr>
|
||||
<td><b>do</b> { </td><td> </td></tr>
|
||||
<tr>
|
||||
<td> select( population, offsprings ); </td><td>// select the offsprings from the current population </td></tr>
|
||||
<tr>
|
||||
<td> transform( offsprings ); </td><td>// crossover and mutation operators are applied on the selected offsprings </td></tr>
|
||||
<tr>
|
||||
<td> evaluate( offsprings ); </td><td>// evaluation step of the resulting offsprings </td></tr>
|
||||
<tr>
|
||||
<td> replace( population, offsprings ); </td><td>// replace the individuals in the current population whith individuals from the offspring population, according to a specified replacement strategy </td></tr>
|
||||
<tr>
|
||||
<td>} <b>while</b> ( eaCheckpointContinue( population ) ); </td><td>// checkpoint operators are applied on the current population </td></tr>
|
||||
</table>
|
||||
<p>
|
||||
The <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoEA.html">peoEA</a> class offers an elementary evolutionary algorithm implementation. The <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoEA.html">peoEA</a> class has the underlying structure for including parallel evaluation and parallel transformation operators, migration operators etc. Although there is no restriction on using the algorithms provided by the EO framework, no parallelism is provided - the EO implementation is exclusively sequential. <br>
|
||||
<h2><a class="anchor" name="requirements">
|
||||
Requirements</a></h2>
|
||||
You should have already installed the ParadisEO-PEO package - this requires several additional packages which should be already included in the provided archive. The installation script has to be launched in order to configure and compile all the required components. At the end of the installation phase you should end up having a directory tree resembling the following: <b> <br>
|
||||
... <br>
|
||||
paradiseo-mo <br>
|
||||
paradiseo-moeo <br>
|
||||
paradiseo-peo <br>
|
||||
docs <br>
|
||||
examples <br>
|
||||
lesson1 <br>
|
||||
lesson2 <br>
|
||||
... <br>
|
||||
shared <br>
|
||||
... <br>
|
||||
src <br>
|
||||
... <br>
|
||||
... </b> <br>
|
||||
<p>
|
||||
The source-code for this tutorial may be found in the <b>paradiseo-peo/examples/lesson1</b> directory, in the <b><a class="el" href="main_8cpp-source.html">main.cpp</a></b> file. For a complete reference on the TSP-related classes and definitions please refer to the files under the <b>paradiseo-peo/examples/shared</b>. After the installation phase you should end up having an <b>tspExample</b> executable file in the <b>paradiseo-peo/examples/lesson1</b> directory. We will discuss testing and launching aspects later in the tutorial.<p>
|
||||
<hr>
|
||||
<b>NOTE</b>: All the presented examples have as case study the <em>Traveling Salesman Problem (TSP)</em>. All the presented tutorials rely on a <a href="../../lsnshared/html/index.html" target="new">common shared source code</a> defining transformation operators, evaluation functions, etc. for the TSP problem. For a complete understanding of the presented tutorials please take your time for consulting and for studying the additional underlying defined classes. <hr>
|
||||
<br>
|
||||
<h2><a class="anchor" name="problemDef">
|
||||
Problem Definition and Representation</a></h2>
|
||||
As we are not directly concerned with the <em>Traveling Salesman Problem</em>, and to some extent out of scope, no in depth details are offered for the TSP. The problem requires finding the shortest path connecting a given set of cities, while visiting each of the specified cities only once and returning to the startpoint city. The problem is known to be NP-complete, i.e. no polynomial time algorithm exists for solving the problem in exact manner.<p>
|
||||
The construction of a ParadisEO-PEO evolutionary algorithm requires following a few simple steps - please take your time to study the signature of the <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoEA.html">peoEA</a> constructor:<p>
|
||||
<table border="0" width="100%" cellspacing="3" cellpadding="3">
|
||||
<tr>
|
||||
<td style="vertical-align:top;"> <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoEA.html">peoEA</a>( <br>
|
||||
eoContinue< EOT >& __cont, <br>
|
||||
peoPopEval< EOT >& __pop_eval, <br>
|
||||
eoSelect< EOT >& __select, <br>
|
||||
peoTransform< EOT >& __trans, <br>
|
||||
eoReplacement< EOT >& __replace <br>
|
||||
); </td><td style="vertical-align:top; text-align:center;"><div align="center">
|
||||
<img src="peoEA.png" alt="peoEA.png">
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
<p>
|
||||
A few remarks have to be made: while most of the parameters are passed as EO-specific types, the evaluation and the transformation objects have to be derived from the ParadisEO-PEO <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoPopEval.html">peoPopEval</a> and <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoTransform.html">peoTransform</a> classes. Derived classes like the <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoParaPopEval.html">peoParaPopEval</a> and <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoParaSGATransform.html">peoParaSGATransform</a> classes allow for parallel evaluation of the population and parallel transformation operators, respectively. Wrappers are provided thus allowing to make use of the EO classes.<p>
|
||||
In the followings, the main required elements for building an evolutionary algorithm are enumerated. For complete details regarding the implementation aspects of each of the components, please refer to the <a href="../../lsnshared/html/index.html" target="new">common shared source code</a>. Each of the bellow refered header files may be found in the <b>pardiseo-peo/examples/shared</b> directory.<p>
|
||||
<ol>
|
||||
<li>
|
||||
<em><b>representation</b></em> - the first decision to be taken concerns the representation of the individuals. You may create your own representation or you may use/derive one of the predefined classes of the EO framework. <br>
|
||||
<p>
|
||||
For our case study, the TSP, each city is defined as a <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//structNode.html">Node</a> in the <b>node.h</b> header file - in fact an unsigned value defined as <b>typedef unsigned <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//structNode.html">Node</a></b>. Moreover, each individual (of the evolutionary algorithm) is represented as a Route object, a vector of <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//structNode.html">Node</a> objects, in the <b>route.h</b> header file - <b>typedef eoVector< int, Node > Route</b>. The definition of the Route object implies two elements: (1) a route is a vector of nodes, and (2) the fitness is an integer value (please refer to the eoVector definition in the EO framework).<p>
|
||||
In addition you should also take a look in the <b>route_init.h</b> header file which includes the RouteInit class, defined for initializing in random manner Route objects. </li>
|
||||
<li>
|
||||
<em><b>evaluation function</b></em> - having a representation model, an evaluation object has to be defined, implementing a specific fitness function. The designed class has to be derived (directly or indirectly) from the <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoPopEval.html">peoPopEval</a> class - you have the choice of using <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoSeqPopEval.html">peoSeqPopEval</a> or <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoParaPopEval.html">peoParaPopEval</a> for sequential and parallel evaluation, respectively. These classes act as wrappers requiring the specification of an EO evaluation object derived from the eoEvalFunc class - please refer to their respective documentation. <br>
|
||||
<p>
|
||||
The fitness function for our TSP case study is implemented in the <b>route_eval.h</b> header file. The class is derived from the eoEvalFunc EO class, being defined as <b>class RouteEval : public eoEvalFunc< Route ></b>. </li>
|
||||
<li>
|
||||
<em><b>transformation operators</b></em> - in order to assure the evolution of the initial population, transformation operators have to be defined. Depending on your prolem, you may specify quadruple operators (two input individuals, two output resulting individuals), i.e. crossover operators, binary operators (one input individual and one output resulting individual), i.e. mutation operators, or combination of both types. As for the evaluation function, the signature of the <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoEA.html">peoEA</a> constructor requires specifying a <a class="elRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoTransform.html">peoTransform</a> derived object as transformation operator.<p>
|
||||
The transform operators, crossover and mutation, for the herein presended example are defined in the <b>order_xover.h</b> and the <b>city_swap.h</b> header files, respectively. </li>
|
||||
<li>
|
||||
<em><b>continuation criterion</b></em> - the evolutionary algorithm evolves in an iterative manner; a continuation criterion has to be specified. One of the most common and simplest options considers a maximum number of generations. It is your choice whether to use a predefined EO class for specifying the continuation criterion or using a custom defined class. In the later case you have to make sure that your class derives the eoContinue class.<br>
|
||||
</li>
|
||||
<li>
|
||||
<em><b>selection strategy</b></em> - at each iteration a set of individuals are selected for applying the transform operators, in order to obtain the offspring population. As the specified parameter has to be derived from the eoSelect it is your option of whehter using the EO provided selection strategies or implementing your own, as long as it inherits the eoSelect class.<p>
|
||||
For our example we chose to use the eoRankingSelect strategy, provided in the EO framework. </li>
|
||||
<li>
|
||||
<em><b>replacement strategy</b></em> - once the offspring population is obtained, the offsprings have to be integrated back into the initial population, according to a given strategy. For custom defined strategies you have to inherit the eoReplacement EO class. We chose to use an eoPlusReplacement as strategy (please review the EO documentation for details on the different strategies available). </li>
|
||||
</ol>
|
||||
<br>
|
||||
<h2><a class="anchor" name="example">
|
||||
A simple example for constructing a peoEA object</a></h2>
|
||||
<table style="border:none; border-spacing:0px;text-align:left; vertical-align:top; font-size:8pt;" border="0" cellspacing="3" cellpadding="3">
|
||||
<tr>
|
||||
<td>... </td><td> </td></tr>
|
||||
<tr>
|
||||
<td>eoPop< EOT > population( POP_SIZE, popInitializer ); </td><td>// creation of a population with POP_SIZE individuals - the popInitializer is a functor to be called for each individual </td></tr>
|
||||
<tr>
|
||||
<td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td>eoGenContinue< EOT > eaCont( NUM_GEN ); </td><td>// number of generations for the evolutionary algorithm </td></tr>
|
||||
<tr>
|
||||
<td>eoCheckPoint< EOT > eaCheckpointContinue( eaCont ); </td><td>// checkpoint incorporating the continuation criterion - startpoint for adding other checkpoint objects </td></tr>
|
||||
<tr>
|
||||
<td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td>peoSeqPopEval< EOT > eaPopEval( evalFunction ); </td><td>// sequential evaluation functor wrapper - evalFunction represents the actual evaluation functor </td></tr>
|
||||
<tr>
|
||||
<td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td>eoRankingSelect< EOT > selectionStrategy; </td><td>// selection strategy for creating the offspring population - a simple ranking selection in this case </td></tr>
|
||||
<tr>
|
||||
<td>eoSelectNumber< EOT > eaSelect( selectionStrategy, POP_SIZE ); </td><td>// the number of individuals to be selected for creating the offspring population </td></tr>
|
||||
<tr>
|
||||
<td>eoRankingSelect< EOT > selectionStrategy; </td><td>// selection strategy for creating the offspring population - a simple ranking selection in this case </td></tr>
|
||||
<tr>
|
||||
<td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td>eoSGATransform< EOT > transform( crossover, CROSS_RATE, mutation, MUT_RATE ); </td><td>// transformation operator - crossover and mutation operators with their associated probabilities </td></tr>
|
||||
<tr>
|
||||
<td>peoSeqTransform< EOT > eaTransform( transform ); </td><td>// ParadisEO specific sequential operator - a parallel version may be specified in the same manner </td></tr>
|
||||
<tr>
|
||||
<td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td>eoPlusReplacement< EOT > eaReplace; </td><td>// replacement strategy - for integrating the offspring resulting individuals in the initial population </td></tr>
|
||||
<tr>
|
||||
<td> </td><td> </td></tr>
|
||||
<tr>
|
||||
<td>peoEA< EOT > eaAlg( eaCheckpointContinue, eaPopEval, eaSelect, eaTransform, eaReplace ); </td><td>// ParadisEO evolutionary algorithm integrating the above defined objects </td></tr>
|
||||
<tr>
|
||||
<td>eaAlg( population ); </td><td>// specifying the initial population for the algorithm </td></tr>
|
||||
<tr>
|
||||
<td>... </td><td> </td></tr>
|
||||
</table>
|
||||
<hr size="1"><address style="align: right;"><small>Generated on Sun Jan 7 18:35:29 2007 for ParadisEO-PEO Lesson1 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>
|
||||
121
trunk/paradiseo-peo/docs/html/lesson1/html/main_8cpp-source.html
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
<!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-PEO Lesson1: main.cpp 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 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>main.cpp</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">// "main.cpp"</span>
|
||||
<a name="l00004"></a>00004
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team, LIFL, January 2006</span>
|
||||
<a name="l00006"></a>00006
|
||||
<a name="l00007"></a>00007 <span class="comment">/* This library is free software; you can redistribute it and/or</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"> modify it under the terms of the GNU Lesser General Public</span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> License as published by the Free Software Foundation; either</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> version 2 of the License, or (at your option) any later version.</span>
|
||||
<a name="l00011"></a>00011 <span class="comment"> </span>
|
||||
<a name="l00012"></a>00012 <span class="comment"> This library is distributed in the hope that it will be useful,</span>
|
||||
<a name="l00013"></a>00013 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
|
||||
<a name="l00014"></a>00014 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>
|
||||
<a name="l00015"></a>00015 <span class="comment"> Lesser General Public License for more details.</span>
|
||||
<a name="l00016"></a>00016 <span class="comment"> </span>
|
||||
<a name="l00017"></a>00017 <span class="comment"> You should have received a copy of the GNU Lesser General Public</span>
|
||||
<a name="l00018"></a>00018 <span class="comment"> License along with this library; if not, write to the Free Software</span>
|
||||
<a name="l00019"></a>00019 <span class="comment"> Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
|
||||
<a name="l00020"></a>00020 <span class="comment"> </span>
|
||||
<a name="l00021"></a>00021 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr</span>
|
||||
<a name="l00022"></a>00022 <span class="comment">*/</span>
|
||||
<a name="l00023"></a>00023
|
||||
<a name="l00024"></a>00024 <span class="preprocessor">#include "param.h"</span>
|
||||
<a name="l00025"></a>00025
|
||||
<a name="l00026"></a>00026 <span class="preprocessor">#include "route.h"</span>
|
||||
<a name="l00027"></a>00027 <span class="preprocessor">#include "route_init.h"</span>
|
||||
<a name="l00028"></a>00028 <span class="preprocessor">#include "route_eval.h"</span>
|
||||
<a name="l00029"></a>00029
|
||||
<a name="l00030"></a>00030 <span class="preprocessor">#include "order_xover.h"</span>
|
||||
<a name="l00031"></a>00031 <span class="preprocessor">#include "city_swap.h"</span>
|
||||
<a name="l00032"></a>00032
|
||||
<a name="l00033"></a>00033 <span class="preprocessor">#include <paradiseo></span>
|
||||
<a name="l00034"></a>00034
|
||||
<a name="l00035"></a>00035
|
||||
<a name="l00036"></a>00036 <span class="preprocessor">#define POP_SIZE 10</span>
|
||||
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define NUM_GEN 100</span>
|
||||
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define CROSS_RATE 1.0</span>
|
||||
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define MUT_RATE 0.01</span>
|
||||
<a name="l00040"></a>00040 <span class="preprocessor"></span>
|
||||
<a name="l00041"></a>00041
|
||||
<a name="l00042"></a>00042 <span class="keywordtype">int</span> main( <span class="keywordtype">int</span> __argc, <span class="keywordtype">char</span>** __argv ) {
|
||||
<a name="l00043"></a>00043
|
||||
<a name="l00044"></a>00044 <span class="comment">// initializing the ParadisEO-PEO environment</span>
|
||||
<a name="l00045"></a>00045 <a class="codeRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//namespacepeo.html#8184c3b1f7eecc68f69bb8e8b872a7d3">peo :: init</a>( __argc, __argv );
|
||||
<a name="l00046"></a>00046
|
||||
<a name="l00047"></a>00047
|
||||
<a name="l00048"></a>00048 <span class="comment">// processing the command line specified parameters</span>
|
||||
<a name="l00049"></a>00049 <a class="codeRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//namespacepeo.html#2b496ee9b81d9ae322ae6edb9a93dc71">loadParameters</a>( __argc, __argv );
|
||||
<a name="l00050"></a>00050
|
||||
<a name="l00051"></a>00051
|
||||
<a name="l00052"></a>00052 <span class="comment">// init, eval operators, EA operators -------------------------------------------------------------------------------------------------------------</span>
|
||||
<a name="l00053"></a>00053
|
||||
<a name="l00054"></a>00054 RouteInit route_init; <span class="comment">// random init object - creates random Route objects</span>
|
||||
<a name="l00055"></a>00055 RouteEval full_eval; <span class="comment">// evaluator object - offers a fitness value for a specified Route object</span>
|
||||
<a name="l00056"></a>00056
|
||||
<a name="l00057"></a>00057 OrderXover crossover; <span class="comment">// crossover operator - creates two offsprings out of two specified parents</span>
|
||||
<a name="l00058"></a>00058 CitySwap mutation; <span class="comment">// mutation operator - randomly mutates one gene for a specified individual</span>
|
||||
<a name="l00059"></a>00059 <span class="comment">// ------------------------------------------------------------------------------------------------------------------------------------------------</span>
|
||||
<a name="l00060"></a>00060
|
||||
<a name="l00061"></a>00061
|
||||
<a name="l00062"></a>00062 <span class="comment">// evolutionary algorithm components --------------------------------------------------------------------------------------------------------------</span>
|
||||
<a name="l00063"></a>00063
|
||||
<a name="l00064"></a>00064 eoPop< Route > population( POP_SIZE, route_init ); <span class="comment">// initial population for the algorithm having POP_SIZE individuals</span>
|
||||
<a name="l00065"></a>00065 <a class="codeRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoSeqPopEval.html">peoSeqPopEval< Route ></a> eaPopEval( full_eval ); <span class="comment">// evaluator object - to be applied at each iteration on the entire population</span>
|
||||
<a name="l00066"></a>00066
|
||||
<a name="l00067"></a>00067 eoGenContinue< Route > eaCont( NUM_GEN ); <span class="comment">// continuation criterion - the algorithm will iterate for NUM_GEN generations</span>
|
||||
<a name="l00068"></a>00068 eoCheckPoint< Route > eaCheckpointContinue( eaCont ); <span class="comment">// checkpoint object - verify at each iteration if the continuation criterion is met</span>
|
||||
<a name="l00069"></a>00069
|
||||
<a name="l00070"></a>00070 eoRankingSelect< Route > selectionStrategy; <span class="comment">// selection strategy - applied at each iteration for selecting parent individuals</span>
|
||||
<a name="l00071"></a>00071 eoSelectNumber< Route > eaSelect( selectionStrategy, POP_SIZE ); <span class="comment">// selection object - POP_SIZE individuals are selected at each iteration</span>
|
||||
<a name="l00072"></a>00072
|
||||
<a name="l00073"></a>00073 <span class="comment">// transform operator - includes the crossover and the mutation operators with a specified associated rate</span>
|
||||
<a name="l00074"></a>00074 eoSGATransform< Route > transform( crossover, CROSS_RATE, mutation, MUT_RATE );
|
||||
<a name="l00075"></a>00075 <a class="codeRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoSeqTransform.html">peoSeqTransform< Route ></a> eaTransform( transform ); <span class="comment">// ParadisEO transform operator (please remark the peo prefix) - wraps an e EO transform object</span>
|
||||
<a name="l00076"></a>00076
|
||||
<a name="l00077"></a>00077 eoPlusReplacement< Route > eaReplace; <span class="comment">// replacement strategy - for replacing the initial population with offspring individuals</span>
|
||||
<a name="l00078"></a>00078 <span class="comment">// ------------------------------------------------------------------------------------------------------------------------------------------------</span>
|
||||
<a name="l00079"></a>00079
|
||||
<a name="l00080"></a>00080
|
||||
<a name="l00081"></a>00081 <span class="comment">// ParadisEO-PEO evolutionary algorithm -----------------------------------------------------------------------------------------------------------</span>
|
||||
<a name="l00082"></a>00082
|
||||
<a name="l00083"></a>00083 <a class="codeRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//classpeoEA.html">peoEA< Route ></a> eaAlg( eaCheckpointContinue, eaPopEval, eaSelect, eaTransform, eaReplace );
|
||||
<a name="l00084"></a>00084
|
||||
<a name="l00085"></a>00085 eaAlg( population ); <span class="comment">// specifying the initial population for the algorithm, to be iteratively evolved</span>
|
||||
<a name="l00086"></a>00086 <span class="comment">// ------------------------------------------------------------------------------------------------------------------------------------------------</span>
|
||||
<a name="l00087"></a>00087
|
||||
<a name="l00088"></a>00088
|
||||
<a name="l00089"></a>00089 <a class="codeRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//namespacepeo.html#10819b2d60b37477c6a89b60c595c67c">peo :: run</a>( );
|
||||
<a name="l00090"></a>00090 <a class="codeRef" doxygen="paradiseo-peo.doxytag:../..//" href="../..//namespacepeo.html#f90478489cc92d1e6abb222179163a30">peo :: finalize</a>( );
|
||||
<a name="l00091"></a>00091 <span class="comment">// shutting down the ParadisEO-PEO environment</span>
|
||||
<a name="l00092"></a>00092
|
||||
<a name="l00093"></a>00093 <span class="keywordflow">return</span> 0;
|
||||
<a name="l00094"></a>00094 }
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Jan 7 18:35:29 2007 for ParadisEO-PEO Lesson1 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>
|
||||
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/peoEA.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/search.idx
Normal file
380
trunk/paradiseo-peo/docs/html/lesson1/html/search.php
Normal file
|
|
@ -0,0 +1,380 @@
|
|||
<!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>Search</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="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>
|
||||
|
||||
<?php
|
||||
|
||||
function search_results()
|
||||
{
|
||||
return "Search Results";
|
||||
}
|
||||
|
||||
function matches_text($num)
|
||||
{
|
||||
if ($num==0)
|
||||
{
|
||||
return "Sorry, no documents matching your query.";
|
||||
}
|
||||
else if ($num==1)
|
||||
{
|
||||
return "Found <b>1</b> document matching your query.";
|
||||
}
|
||||
else // $num>1
|
||||
{
|
||||
return "Found <b>$num</b> documents matching your query. Showing best matches first.";
|
||||
}
|
||||
}
|
||||
|
||||
function report_matches()
|
||||
{
|
||||
return "Matches: ";
|
||||
}
|
||||
function end_form($value)
|
||||
{
|
||||
echo " <td><input type=\"text\" name=\"query\" value=\"$value\" size=\"20\" accesskey=\"s\"/></td>\n </tr>\n </table>\n </form>\n </li>\n </ul>\n</div>\n";
|
||||
}
|
||||
|
||||
function readInt($file)
|
||||
{
|
||||
$b1 = ord(fgetc($file)); $b2 = ord(fgetc($file));
|
||||
$b3 = ord(fgetc($file)); $b4 = ord(fgetc($file));
|
||||
return ($b1<<24)|($b2<<16)|($b3<<8)|$b4;
|
||||
}
|
||||
|
||||
function readString($file)
|
||||
{
|
||||
$result="";
|
||||
while (ord($c=fgetc($file))) $result.=$c;
|
||||
return $result;
|
||||
}
|
||||
|
||||
function readHeader($file)
|
||||
{
|
||||
$header =fgetc($file); $header.=fgetc($file);
|
||||
$header.=fgetc($file); $header.=fgetc($file);
|
||||
return $header;
|
||||
}
|
||||
|
||||
function computeIndex($word)
|
||||
{
|
||||
// Fast string hashing
|
||||
//$lword = strtolower($word);
|
||||
//$l = strlen($lword);
|
||||
//for ($i=0;$i<$l;$i++)
|
||||
//{
|
||||
// $c = ord($lword{$i});
|
||||
// $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff;
|
||||
//}
|
||||
//return $v;
|
||||
|
||||
// Simple hashing that allows for substring search
|
||||
if (strlen($word)<2) return -1;
|
||||
// high char of the index
|
||||
$hi = ord($word{0});
|
||||
if ($hi==0) return -1;
|
||||
// low char of the index
|
||||
$lo = ord($word{1});
|
||||
if ($lo==0) return -1;
|
||||
// return index
|
||||
return $hi*256+$lo;
|
||||
}
|
||||
|
||||
function search($file,$word,&$statsList)
|
||||
{
|
||||
$index = computeIndex($word);
|
||||
if ($index!=-1) // found a valid index
|
||||
{
|
||||
fseek($file,$index*4+4); // 4 bytes per entry, skip header
|
||||
$index = readInt($file);
|
||||
if ($index) // found words matching the hash key
|
||||
{
|
||||
$start=sizeof($statsList);
|
||||
$count=$start;
|
||||
fseek($file,$index);
|
||||
$w = readString($file);
|
||||
while ($w)
|
||||
{
|
||||
$statIdx = readInt($file);
|
||||
if ($word==substr($w,0,strlen($word)))
|
||||
{ // found word that matches (as substring)
|
||||
$statsList[$count++]=array(
|
||||
"word"=>$word,
|
||||
"match"=>$w,
|
||||
"index"=>$statIdx,
|
||||
"full"=>strlen($w)==strlen($word),
|
||||
"docs"=>array()
|
||||
);
|
||||
}
|
||||
$w = readString($file);
|
||||
}
|
||||
$totalHi=0;
|
||||
$totalFreqHi=0;
|
||||
$totalFreqLo=0;
|
||||
for ($count=$start;$count<sizeof($statsList);$count++)
|
||||
{
|
||||
$statInfo = &$statsList[$count];
|
||||
$multiplier = 1;
|
||||
// whole word matches have a double weight
|
||||
if ($statInfo["full"]) $multiplier=2;
|
||||
fseek($file,$statInfo["index"]);
|
||||
$numDocs = readInt($file);
|
||||
$docInfo = array();
|
||||
// read docs info + occurrence frequency of the word
|
||||
for ($i=0;$i<$numDocs;$i++)
|
||||
{
|
||||
$idx=readInt($file);
|
||||
$freq=readInt($file);
|
||||
$docInfo[$i]=array("idx" => $idx,
|
||||
"freq" => $freq>>1,
|
||||
"rank" => 0.0,
|
||||
"hi" => $freq&1
|
||||
);
|
||||
if ($freq&1) // word occurs in high priority doc
|
||||
{
|
||||
$totalHi++;
|
||||
$totalFreqHi+=$freq*$multiplier;
|
||||
}
|
||||
else // word occurs in low priority doc
|
||||
{
|
||||
$totalFreqLo+=$freq*$multiplier;
|
||||
}
|
||||
}
|
||||
// read name and url info for the doc
|
||||
for ($i=0;$i<$numDocs;$i++)
|
||||
{
|
||||
fseek($file,$docInfo[$i]["idx"]);
|
||||
$docInfo[$i]["name"]=readString($file);
|
||||
$docInfo[$i]["url"]=readString($file);
|
||||
}
|
||||
$statInfo["docs"]=$docInfo;
|
||||
}
|
||||
$totalFreq=($totalHi+1)*$totalFreqLo + $totalFreqHi;
|
||||
for ($count=$start;$count<sizeof($statsList);$count++)
|
||||
{
|
||||
$statInfo = &$statsList[$count];
|
||||
$multiplier = 1;
|
||||
// whole word matches have a double weight
|
||||
if ($statInfo["full"]) $multiplier=2;
|
||||
for ($i=0;$i<sizeof($statInfo["docs"]);$i++)
|
||||
{
|
||||
$docInfo = &$statInfo["docs"];
|
||||
// compute frequency rank of the word in each doc
|
||||
$freq=$docInfo[$i]["freq"];
|
||||
if ($docInfo[$i]["hi"])
|
||||
{
|
||||
$statInfo["docs"][$i]["rank"]=
|
||||
(float)($freq*$multiplier+$totalFreqLo)/$totalFreq;
|
||||
}
|
||||
else
|
||||
{
|
||||
$statInfo["docs"][$i]["rank"]=
|
||||
(float)($freq*$multiplier)/$totalFreq;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $statsList;
|
||||
}
|
||||
|
||||
function combine_results($results,&$docs)
|
||||
{
|
||||
foreach ($results as $wordInfo)
|
||||
{
|
||||
$docsList = &$wordInfo["docs"];
|
||||
foreach ($docsList as $di)
|
||||
{
|
||||
$key=$di["url"];
|
||||
$rank=$di["rank"];
|
||||
if (in_array($key, array_keys($docs)))
|
||||
{
|
||||
$docs[$key]["rank"]+=$rank;
|
||||
}
|
||||
else
|
||||
{
|
||||
$docs[$key] = array("url"=>$key,
|
||||
"name"=>$di["name"],
|
||||
"rank"=>$rank
|
||||
);
|
||||
}
|
||||
$docs[$key]["words"][] = array(
|
||||
"word"=>$wordInfo["word"],
|
||||
"match"=>$wordInfo["match"],
|
||||
"freq"=>$di["freq"]
|
||||
);
|
||||
}
|
||||
}
|
||||
return $docs;
|
||||
}
|
||||
|
||||
function filter_results($docs,&$requiredWords,&$forbiddenWords)
|
||||
{
|
||||
$filteredDocs=array();
|
||||
while (list ($key, $val) = each ($docs))
|
||||
{
|
||||
$words = &$docs[$key]["words"];
|
||||
$copy=1; // copy entry by default
|
||||
if (sizeof($requiredWords)>0)
|
||||
{
|
||||
foreach ($requiredWords as $reqWord)
|
||||
{
|
||||
$found=0;
|
||||
foreach ($words as $wordInfo)
|
||||
{
|
||||
$found = $wordInfo["word"]==$reqWord;
|
||||
if ($found) break;
|
||||
}
|
||||
if (!$found)
|
||||
{
|
||||
$copy=0; // document contains none of the required words
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sizeof($forbiddenWords)>0)
|
||||
{
|
||||
foreach ($words as $wordInfo)
|
||||
{
|
||||
if (in_array($wordInfo["word"],$forbiddenWords))
|
||||
{
|
||||
$copy=0; // document contains a forbidden word
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($copy) $filteredDocs[$key]=$docs[$key];
|
||||
}
|
||||
return $filteredDocs;
|
||||
}
|
||||
|
||||
function compare_rank($a,$b)
|
||||
{
|
||||
if ($a["rank"] == $b["rank"])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return ($a["rank"]>$b["rank"]) ? -1 : 1;
|
||||
}
|
||||
|
||||
function sort_results($docs,&$sorted)
|
||||
{
|
||||
$sorted = $docs;
|
||||
usort($sorted,"compare_rank");
|
||||
return $sorted;
|
||||
}
|
||||
|
||||
function report_results(&$docs)
|
||||
{
|
||||
echo "<table cellspacing=\"2\">\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan=\"2\"><h2>".search_results()."</h2></td>\n";
|
||||
echo " </tr>\n";
|
||||
$numDocs = sizeof($docs);
|
||||
if ($numDocs==0)
|
||||
{
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan=\"2\">".matches_text(0)."</td>\n";
|
||||
echo " </tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " <tr>\n";
|
||||
echo " <td colspan=\"2\">".matches_text($numDocs);
|
||||
echo "\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
$num=1;
|
||||
foreach ($docs as $doc)
|
||||
{
|
||||
echo " <tr>\n";
|
||||
echo " <td align=\"right\">$num.</td>";
|
||||
echo "<td><a class=\"el\" href=\"".$doc["url"]."\">".$doc["name"]."</a></td>\n";
|
||||
echo " <tr>\n";
|
||||
echo " <td></td><td class=\"tiny\">".report_matches()." ";
|
||||
foreach ($doc["words"] as $wordInfo)
|
||||
{
|
||||
$word = $wordInfo["word"];
|
||||
$matchRight = substr($wordInfo["match"],strlen($word));
|
||||
echo "<b>$word</b>$matchRight(".$wordInfo["freq"].") ";
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
$num++;
|
||||
}
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
||||
function main()
|
||||
{
|
||||
if(strcmp('4.1.0', phpversion()) > 0)
|
||||
{
|
||||
die("Error: PHP version 4.1.0 or above required!");
|
||||
}
|
||||
if (!($file=fopen("search.idx","rb")))
|
||||
{
|
||||
die("Error: Search index file could NOT be opened!");
|
||||
}
|
||||
if (readHeader($file)!="DOXS")
|
||||
{
|
||||
die("Error: Header of index file is invalid!");
|
||||
}
|
||||
$query="";
|
||||
if (array_key_exists("query", $_GET))
|
||||
{
|
||||
$query=$_GET["query"];
|
||||
}
|
||||
end_form($query);
|
||||
echo " \n<div class=\"searchresults\">\n";
|
||||
$results = array();
|
||||
$requiredWords = array();
|
||||
$forbiddenWords = array();
|
||||
$foundWords = array();
|
||||
$word=strtok($query," ");
|
||||
while ($word) // for each word in the search query
|
||||
{
|
||||
if (($word{0}=='+')) { $word=substr($word,1); $requiredWords[]=$word; }
|
||||
if (($word{0}=='-')) { $word=substr($word,1); $forbiddenWords[]=$word; }
|
||||
if (!in_array($word,$foundWords))
|
||||
{
|
||||
$foundWords[]=$word;
|
||||
search($file,strtolower($word),$results);
|
||||
}
|
||||
$word=strtok(" ");
|
||||
}
|
||||
$docs = array();
|
||||
combine_results($results,$docs);
|
||||
// filter out documents with forbidden word or that do not contain
|
||||
// required words
|
||||
$filteredDocs = filter_results($docs,$requiredWords,$forbiddenWords);
|
||||
// sort the results based on rank
|
||||
$sorted = array();
|
||||
sort_results($filteredDocs,$sorted);
|
||||
// report results to the user
|
||||
report_results($sorted);
|
||||
echo "</div>\n";
|
||||
fclose($file);
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
|
||||
?>
|
||||
<hr size="1"><address style="align: right;"><small>Generated on Sun Jan 7 18:35:29 2007 for ParadisEO-PEO Lesson1 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>
|
||||
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/tab_b.gif
Normal file
|
After Width: | Height: | Size: 35 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/tab_l.gif
Normal file
|
After Width: | Height: | Size: 706 B |
BIN
trunk/paradiseo-peo/docs/html/lesson1/html/tab_r.gif
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
102
trunk/paradiseo-peo/docs/html/lesson1/html/tabs.css
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
|
||||
|
||||
DIV.tabs
|
||||
{
|
||||
float : left;
|
||||
width : 100%;
|
||||
background : url("tab_b.gif") repeat-x bottom;
|
||||
margin-bottom : 4px;
|
||||
}
|
||||
|
||||
DIV.tabs UL
|
||||
{
|
||||
margin : 0px;
|
||||
padding-left : 10px;
|
||||
list-style : none;
|
||||
}
|
||||
|
||||
DIV.tabs LI, DIV.tabs FORM
|
||||
{
|
||||
display : inline;
|
||||
margin : 0px;
|
||||
padding : 0px;
|
||||
}
|
||||
|
||||
DIV.tabs FORM
|
||||
{
|
||||
float : right;
|
||||
}
|
||||
|
||||
DIV.tabs A
|
||||
{
|
||||
float : left;
|
||||
background : url("tab_r.gif") no-repeat right top;
|
||||
border-bottom : 1px solid #84B0C7;
|
||||
font-size : x-small;
|
||||
font-weight : bold;
|
||||
text-decoration : none;
|
||||
}
|
||||
|
||||
DIV.tabs A:hover
|
||||
{
|
||||
background-position: 100% -150px;
|
||||
}
|
||||
|
||||
DIV.tabs A:link, DIV.tabs A:visited,
|
||||
DIV.tabs A:active, DIV.tabs A:hover
|
||||
{
|
||||
color: #1A419D;
|
||||
}
|
||||
|
||||
DIV.tabs SPAN
|
||||
{
|
||||
float : left;
|
||||
display : block;
|
||||
background : url("tab_l.gif") no-repeat left top;
|
||||
padding : 5px 9px;
|
||||
white-space : nowrap;
|
||||
}
|
||||
|
||||
DIV.tabs INPUT
|
||||
{
|
||||
float : right;
|
||||
display : inline;
|
||||
font-size : 1em;
|
||||
}
|
||||
|
||||
DIV.tabs TD
|
||||
{
|
||||
font-size : x-small;
|
||||
font-weight : bold;
|
||||
text-decoration : none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Commented Backslash Hack hides rule from IE5-Mac \*/
|
||||
DIV.tabs SPAN {float : none;}
|
||||
/* End IE5-Mac hack */
|
||||
|
||||
DIV.tabs A:hover SPAN
|
||||
{
|
||||
background-position: 0% -150px;
|
||||
}
|
||||
|
||||
DIV.tabs LI#current A
|
||||
{
|
||||
background-position: 100% -150px;
|
||||
border-width : 0px;
|
||||
}
|
||||
|
||||
DIV.tabs LI#current SPAN
|
||||
{
|
||||
background-position: 0% -150px;
|
||||
padding-bottom : 6px;
|
||||
}
|
||||
|
||||
DIV.nav
|
||||
{
|
||||
background : none;
|
||||
border : none;
|
||||
border-bottom : 1px solid #84B0C7;
|
||||
}
|
||||
75
trunk/paradiseo-peo/docs/html/lesson1/html/tree.html
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
||||
<meta http-equiv="Content-Language" content="en" />
|
||||
<link rel="stylesheet" href="doxygen.css">
|
||||
<title>TreeView</title>
|
||||
<script type="text/javascript">
|
||||
<!-- // Hide script from old browsers
|
||||
|
||||
function toggleFolder(id, imageNode)
|
||||
{
|
||||
var folder = document.getElementById(id);
|
||||
var l = imageNode.src.length;
|
||||
if (imageNode.src.substring(l-20,l)=="ftv2folderclosed.png" ||
|
||||
imageNode.src.substring(l-18,l)=="ftv2folderopen.png")
|
||||
{
|
||||
imageNode = imageNode.previousSibling;
|
||||
l = imageNode.src.length;
|
||||
}
|
||||
if (folder == null)
|
||||
{
|
||||
}
|
||||
else if (folder.style.display == "block")
|
||||
{
|
||||
if (imageNode != null)
|
||||
{
|
||||
imageNode.nextSibling.src = "ftv2folderclosed.png";
|
||||
if (imageNode.src.substring(l-13,l) == "ftv2mnode.png")
|
||||
{
|
||||
imageNode.src = "ftv2pnode.png";
|
||||
}
|
||||
else if (imageNode.src.substring(l-17,l) == "ftv2mlastnode.png")
|
||||
{
|
||||
imageNode.src = "ftv2plastnode.png";
|
||||
}
|
||||
}
|
||||
folder.style.display = "none";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (imageNode != null)
|
||||
{
|
||||
imageNode.nextSibling.src = "ftv2folderopen.png";
|
||||
if (imageNode.src.substring(l-13,l) == "ftv2pnode.png")
|
||||
{
|
||||
imageNode.src = "ftv2mnode.png";
|
||||
}
|
||||
else if (imageNode.src.substring(l-17,l) == "ftv2plastnode.png")
|
||||
{
|
||||
imageNode.src = "ftv2mlastnode.png";
|
||||
}
|
||||
}
|
||||
folder.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
// End script hiding -->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="ftvtree">
|
||||
<div class="directory">
|
||||
<h3>ParadisEO-PEO Lesson1</h3>
|
||||
<div style="display: block;">
|
||||
<p><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><a class="el" href="main.html" target="basefrm">Creating a simple ParadisEO-PEO Evolutionary Algorithm</a></p>
|
||||
<p><img src="ftv2plastnode.png" alt="\" width=16 height=22 onclick="toggleFolder('folder1', this)"/><img src="ftv2folderclosed.png" alt="+" width=24 height=22 onclick="toggleFolder('folder1', this)"/><a class="el" href="files.html" target="basefrm">File List</a></p>
|
||||
<div id="folder1">
|
||||
<p><img src="ftv2blank.png" alt=" " width=16 height=22 /><img src="ftv2node.png" alt="o" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><b>doclsn.h</b></p>
|
||||
<p><img src="ftv2blank.png" alt=" " width=16 height=22 /><img src="ftv2lastnode.png" alt="\" width=16 height=22 /><img src="ftv2doc.png" alt="*" width=24 height=22 /><b>main.cpp</b></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
trunk/paradiseo-peo/docs/html/lesson1/latex/FreeSans.ttf
Normal file
17
trunk/paradiseo-peo/docs/html/lesson1/latex/Makefile
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
all: clean refman.pdf
|
||||
|
||||
refman.pdf: refman.tex
|
||||
pdflatex refman.tex
|
||||
makeindex refman.idx
|
||||
pdflatex refman.tex
|
||||
latex_count=5 ; \
|
||||
while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\
|
||||
do \
|
||||
echo "Rerunning latex...." ;\
|
||||
pdflatex refman.tex ;\
|
||||
latex_count=`expr $$latex_count - 1` ;\
|
||||
done
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf
|
||||
78
trunk/paradiseo-peo/docs/html/lesson1/latex/doxygen.sty
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{doxygen}
|
||||
\RequirePackage{calc}
|
||||
\RequirePackage{array}
|
||||
\pagestyle{fancyplain}
|
||||
\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}}
|
||||
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
|
||||
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
|
||||
\lhead[\fancyplain{}{\bfseries\thepage}]
|
||||
{\fancyplain{}{\bfseries\rightmark}}
|
||||
\rhead[\fancyplain{}{\bfseries\leftmark}]
|
||||
{\fancyplain{}{\bfseries\thepage}}
|
||||
\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Sun Jan 7 18:35:29 2007 for Paradis\-EO-PEO Lesson1 by Doxygen }]{}
|
||||
\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Sun Jan 7 18:35:29 2007 for Paradis\-EO-PEO Lesson1 by Doxygen }}
|
||||
\cfoot{}
|
||||
\newenvironment{Code}
|
||||
{\footnotesize}
|
||||
{\normalsize}
|
||||
\newcommand{\doxyref}[3]{\textbf{#1} (\textnormal{#2}\,\pageref{#3})}
|
||||
\newenvironment{DocInclude}
|
||||
{\footnotesize}
|
||||
{\normalsize}
|
||||
\newenvironment{VerbInclude}
|
||||
{\footnotesize}
|
||||
{\normalsize}
|
||||
\newenvironment{Image}
|
||||
{\begin{figure}[H]}
|
||||
{\end{figure}}
|
||||
\newenvironment{ImageNoCaption}{}{}
|
||||
\newenvironment{CompactList}
|
||||
{\begin{list}{}{
|
||||
\setlength{\leftmargin}{0.5cm}
|
||||
\setlength{\itemsep}{0pt}
|
||||
\setlength{\parsep}{0pt}
|
||||
\setlength{\topsep}{0pt}
|
||||
\renewcommand{\makelabel}{\hfill}}}
|
||||
{\end{list}}
|
||||
\newenvironment{CompactItemize}
|
||||
{
|
||||
\begin{itemize}
|
||||
\setlength{\itemsep}{-3pt}
|
||||
\setlength{\parsep}{0pt}
|
||||
\setlength{\topsep}{0pt}
|
||||
\setlength{\partopsep}{0pt}
|
||||
}
|
||||
{\end{itemize}}
|
||||
\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}
|
||||
\newlength{\tmplength}
|
||||
\newenvironment{TabularC}[1]
|
||||
{
|
||||
\setlength{\tmplength}
|
||||
{\linewidth/(#1)-\tabcolsep*2-\arrayrulewidth*(#1+1)/(#1)}
|
||||
\par\begin{tabular*}{\linewidth}
|
||||
{*{#1}{|>{\PBS\raggedright\hspace{0pt}}p{\the\tmplength}}|}
|
||||
}
|
||||
{\end{tabular*}\par}
|
||||
\newcommand{\entrylabel}[1]{
|
||||
{\parbox[b]{\labelwidth-4pt}{\makebox[0pt][l]{\textbf{#1}}\vspace{1.5\baselineskip}}}}
|
||||
\newenvironment{Desc}
|
||||
{\begin{list}{}
|
||||
{
|
||||
\settowidth{\labelwidth}{40pt}
|
||||
\setlength{\leftmargin}{\labelwidth}
|
||||
\setlength{\parsep}{0pt}
|
||||
\setlength{\itemsep}{-4pt}
|
||||
\renewcommand{\makelabel}{\entrylabel}
|
||||
}
|
||||
}
|
||||
{\end{list}}
|
||||
\newenvironment{Indent}
|
||||
{\begin{list}{}{\setlength{\leftmargin}{0.5cm}}
|
||||
\item[]\ignorespaces}
|
||||
{\unskip\end{list}}
|
||||
\setlength{\parindent}{0cm}
|
||||
\setlength{\parskip}{0.2cm}
|
||||
\addtocounter{secnumdepth}{1}
|
||||
\sloppy
|
||||
\usepackage[T1]{fontenc}
|
||||
101
trunk/paradiseo-peo/docs/html/lesson1/latex/main.tex
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
\hypertarget{main_structure}{}\section{Introduction}\label{main_structure}
|
||||
One of the first steps in designing an evolutionary algorihtm using the Paradis\-EO-PEO framework consists in having a clear overview of the implemented algorithm. A brief pseudo-code description is offered bellow - the entire source code for the Paradis\-EO-PEO evolutionary algorithm is defined in the {\bf peo\-EA.h} header file. The main elements to be considered when building an evolutionary algorithm are the transformation operators, i.e. crossover and mutation, the evaluation function, the continuation criterion and the selection and replacement strategy.
|
||||
|
||||
\begin{TabularC}{2}
|
||||
\hline
|
||||
{\bf do} \{ ~ &~ \\\hline
|
||||
~~~~~~~~ select( population, offsprings ); ~ &// select the offsprings from the current population \\\hline
|
||||
~~~~~~~~ transform( offsprings ); ~ &// crossover and mutation operators are applied on the selected offsprings \\\hline
|
||||
~~~~~~~~ evaluate( offsprings ); ~ &// evaluation step of the resulting offsprings \\\hline
|
||||
~~~~~~~~ replace( population, offsprings ); ~ &// replace the individuals in the current population whith individuals from the offspring population, according to a specified replacement strategy \\\hline
|
||||
\} {\bf while} ( ea\-Checkpoint\-Continue( population ) ); ~ &// checkpoint operators are applied on the current population \\\hline
|
||||
\end{TabularC}
|
||||
|
||||
|
||||
The \doxyref{peo\-EA} class offers an elementary evolutionary algorithm implementation. The \doxyref{peo\-EA} class has the underlying structure for including parallel evaluation and parallel transformation operators, migration operators etc. Although there is no restriction on using the algorithms provided by the EO framework, no parallelism is provided - the EO implementation is exclusively sequential. \par
|
||||
\hypertarget{main_requirements}{}\section{Requirements}\label{main_requirements}
|
||||
You should have already installed the Paradis\-EO-PEO package - this requires several additional packages which should be already included in the provided archive. The installation script has to be launched in order to configure and compile all the required components. At the end of the installation phase you should end up having a directory tree resembling the following: {\bf \par
|
||||
~~~~ ... \par
|
||||
~~~~ paradiseo-mo \par
|
||||
~~~~ paradiseo-moeo \par
|
||||
~~~~ paradiseo-peo \par
|
||||
~~~~ ~~~~~~ docs \par
|
||||
~~~~ ~~~~~~ examples \par
|
||||
~~~~ ~~~~~~ ~~~~~~ lesson1 \par
|
||||
~~~~ ~~~~~~ ~~~~~~ lesson2 \par
|
||||
~~~~ ~~~~~~ ~~~~~~ ... \par
|
||||
~~~~ ~~~~~~ ~~~~~~ shared \par
|
||||
~~~~ ~~~~~~ ~~~~~~ ... \par
|
||||
~~~~ ~~~~~~ src \par
|
||||
~~~~ ~~~~~~ ... \par
|
||||
~~~~ ... } \par
|
||||
|
||||
|
||||
The source-code for this tutorial may be found in the {\bf paradiseo-peo/examples/lesson1} directory, in the {\bf \hyperlink{main_8cpp-source}{main.cpp}} file. For a complete reference on the TSP-related classes and definitions please refer to the files under the {\bf paradiseo-peo/examples/shared}. After the installation phase you should end up having an {\bf tsp\-Example} executable file in the {\bf paradiseo-peo/examples/lesson1} directory. We will discuss testing and launching aspects later in the tutorial.
|
||||
|
||||
|
||||
|
||||
{\bf NOTE}: All the presented examples have as case study the {\em Traveling Salesman Problem (TSP)\/}. All the presented tutorials rely on a \href{../../lsnshared/html/index.html}{\tt common shared source code} defining transformation operators, evaluation functions, etc. for the TSP problem. For a complete understanding of the presented tutorials please take your time for consulting and for studying the additional underlying defined classes.
|
||||
|
||||
\par
|
||||
\hypertarget{main_problemDef}{}\section{Problem Definition and Representation}\label{main_problemDef}
|
||||
As we are not directly concerned with the {\em Traveling Salesman Problem\/}, and to some extent out of scope, no in depth details are offered for the TSP. The problem requires finding the shortest path connecting a given set of cities, while visiting each of the specified cities only once and returning to the startpoint city. The problem is known to be NP-complete, i.e. no polynomial time algorithm exists for solving the problem in exact manner.
|
||||
|
||||
The construction of a Paradis\-EO-PEO evolutionary algorithm requires following a few simple steps - please take your time to study the signature of the \doxyref{peo\-EA} constructor:
|
||||
|
||||
\begin{TabularC}{2}
|
||||
\hline
|
||||
~~~~ \doxyref{peo\-EA}( \par
|
||||
~~~~ ~~~~~~ eo\-Continue$<$ EOT $>$\& \_\-\_\-cont, \par
|
||||
~~~~ ~~~~~~ peo\-Pop\-Eval$<$ EOT $>$\& \_\-\_\-pop\_\-eval, \par
|
||||
~~~~ ~~~~~~ eo\-Select$<$ EOT $>$\& \_\-\_\-select, \par
|
||||
~~~~ ~~~~~~ peo\-Transform$<$ EOT $>$\& \_\-\_\-trans, \par
|
||||
~~~~ ~~~~~~ eo\-Replacement$<$ EOT $>$\& \_\-\_\-replace \par
|
||||
~~~~ ); & \\\hline
|
||||
\end{TabularC}
|
||||
|
||||
|
||||
A few remarks have to be made: while most of the parameters are passed as EO-specific types, the evaluation and the transformation objects have to be derived from the Paradis\-EO-PEO \doxyref{peo\-Pop\-Eval} and \doxyref{peo\-Transform} classes. Derived classes like the \doxyref{peo\-Para\-Pop\-Eval} and \doxyref{peo\-Para\-SGATransform} classes allow for parallel evaluation of the population and parallel transformation operators, respectively. Wrappers are provided thus allowing to make use of the EO classes.
|
||||
|
||||
In the followings, the main required elements for building an evolutionary algorithm are enumerated. For complete details regarding the implementation aspects of each of the components, please refer to the \href{../../lsnshared/html/index.html}{\tt common shared source code}. Each of the bellow refered header files may be found in the {\bf pardiseo-peo/examples/shared} directory.
|
||||
|
||||
\begin{enumerate}
|
||||
\item {\em {\bf representation}\/} - the first decision to be taken concerns the representation of the individuals. You may create your own representation or you may use/derive one of the predefined classes of the EO framework. \par
|
||||
|
||||
|
||||
For our case study, the TSP, each city is defined as a \doxyref{Node} in the {\bf node.h} header file - in fact an unsigned value defined as {\bf typedef unsigned \doxyref{Node}}. Moreover, each individual (of the evolutionary algorithm) is represented as a Route object, a vector of \doxyref{Node} objects, in the {\bf route.h} header file - {\bf typedef eo\-Vector$<$ int, Node $>$ Route}. The definition of the Route object implies two elements: (1) a route is a vector of nodes, and (2) the fitness is an integer value (please refer to the eo\-Vector definition in the EO framework).
|
||||
|
||||
In addition you should also take a look in the {\bf route\_\-init.h} header file which includes the Route\-Init class, defined for initializing in random manner Route objects. \item {\em {\bf evaluation function}\/} - having a representation model, an evaluation object has to be defined, implementing a specific fitness function. The designed class has to be derived (directly or indirectly) from the \doxyref{peo\-Pop\-Eval} class - you have the choice of using \doxyref{peo\-Seq\-Pop\-Eval} or \doxyref{peo\-Para\-Pop\-Eval} for sequential and parallel evaluation, respectively. These classes act as wrappers requiring the specification of an EO evaluation object derived from the eo\-Eval\-Func class - please refer to their respective documentation. \par
|
||||
|
||||
|
||||
The fitness function for our TSP case study is implemented in the {\bf route\_\-eval.h} header file. The class is derived from the eo\-Eval\-Func EO class, being defined as {\bf class Route\-Eval : public eo\-Eval\-Func$<$ Route $>$}. \item {\em {\bf transformation operators}\/} - in order to assure the evolution of the initial population, transformation operators have to be defined. Depending on your prolem, you may specify quadruple operators (two input individuals, two output resulting individuals), i.e. crossover operators, binary operators (one input individual and one output resulting individual), i.e. mutation operators, or combination of both types. As for the evaluation function, the signature of the \doxyref{peo\-EA} constructor requires specifying a \doxyref{peo\-Transform} derived object as transformation operator.
|
||||
|
||||
The transform operators, crossover and mutation, for the herein presended example are defined in the {\bf order\_\-xover.h} and the {\bf city\_\-swap.h} header files, respectively. \item {\em {\bf continuation criterion}\/} - the evolutionary algorithm evolves in an iterative manner; a continuation criterion has to be specified. One of the most common and simplest options considers a maximum number of generations. It is your choice whether to use a predefined EO class for specifying the continuation criterion or using a custom defined class. In the later case you have to make sure that your class derives the eo\-Continue class.\par
|
||||
\item {\em {\bf selection strategy}\/} - at each iteration a set of individuals are selected for applying the transform operators, in order to obtain the offspring population. As the specified parameter has to be derived from the eo\-Select it is your option of whehter using the EO provided selection strategies or implementing your own, as long as it inherits the eo\-Select class.
|
||||
|
||||
For our example we chose to use the eo\-Ranking\-Select strategy, provided in the EO framework. \item {\em {\bf replacement strategy}\/} - once the offspring population is obtained, the offsprings have to be integrated back into the initial population, according to a given strategy. For custom defined strategies you have to inherit the eo\-Replacement EO class. We chose to use an eo\-Plus\-Replacement as strategy (please review the EO documentation for details on the different strategies available). \end{enumerate}
|
||||
\par
|
||||
\hypertarget{main_example}{}\section{A simple example for constructing a peo\-EA object}\label{main_example}
|
||||
\begin{TabularC}{2}
|
||||
\hline
|
||||
... ~ &~ \\\hline
|
||||
eo\-Pop$<$ EOT $>$ population( POP\_\-SIZE, pop\-Initializer ); ~ &// creation of a population with POP\_\-SIZE individuals - the pop\-Initializer is a functor to be called for each individual \\\hline
|
||||
~ &~ \\\hline
|
||||
eo\-Gen\-Continue$<$ EOT $>$ ea\-Cont( NUM\_\-GEN ); ~ &// number of generations for the evolutionary algorithm \\\hline
|
||||
eo\-Check\-Point$<$ EOT $>$ ea\-Checkpoint\-Continue( ea\-Cont ); ~ &// checkpoint incorporating the continuation criterion - startpoint for adding other checkpoint objects \\\hline
|
||||
~ &~ \\\hline
|
||||
peo\-Seq\-Pop\-Eval$<$ EOT $>$ ea\-Pop\-Eval( eval\-Function ); ~ &// sequential evaluation functor wrapper - eval\-Function represents the actual evaluation functor \\\hline
|
||||
~ &~ \\\hline
|
||||
eo\-Ranking\-Select$<$ EOT $>$ selection\-Strategy; ~ &// selection strategy for creating the offspring population - a simple ranking selection in this case \\\hline
|
||||
eo\-Select\-Number$<$ EOT $>$ ea\-Select( selection\-Strategy, POP\_\-SIZE ); ~ &// the number of individuals to be selected for creating the offspring population \\\hline
|
||||
eo\-Ranking\-Select$<$ EOT $>$ selection\-Strategy; ~ &// selection strategy for creating the offspring population - a simple ranking selection in this case \\\hline
|
||||
~ &~ \\\hline
|
||||
eo\-SGATransform$<$ EOT $>$ transform( crossover, CROSS\_\-RATE, mutation, MUT\_\-RATE ); ~ &// transformation operator - crossover and mutation operators with their associated probabilities \\\hline
|
||||
peo\-Seq\-Transform$<$ EOT $>$ ea\-Transform( transform ); ~ &// Paradis\-EO specific sequential operator - a parallel version may be specified in the same manner \\\hline
|
||||
~ &~ \\\hline
|
||||
eo\-Plus\-Replacement$<$ EOT $>$ ea\-Replace; ~ &// replacement strategy - for integrating the offspring resulting individuals in the initial population \\\hline
|
||||
~ &~ \\\hline
|
||||
peo\-EA$<$ EOT $>$ ea\-Alg( ea\-Checkpoint\-Continue, ea\-Pop\-Eval, ea\-Select, ea\-Transform, ea\-Replace ); ~ &// Paradis\-EO evolutionary algorithm integrating the above defined objects \\\hline
|
||||
ea\-Alg( population ); ~ &// specifying the initial population for the algorithm \\\hline
|
||||
... ~ &~ \\\hline
|
||||
\end{TabularC}
|
||||
49
trunk/paradiseo-peo/docs/html/lesson1/latex/refman.tex
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
\documentclass[a4paper]{book}
|
||||
\usepackage{a4wide}
|
||||
\usepackage{makeidx}
|
||||
\usepackage{fancyhdr}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{multicol}
|
||||
\usepackage{float}
|
||||
\usepackage{textcomp}
|
||||
\usepackage{alltt}
|
||||
\usepackage{times}
|
||||
\usepackage{ifpdf}
|
||||
\ifpdf
|
||||
\usepackage[pdftex,
|
||||
pagebackref=true,
|
||||
colorlinks=true,
|
||||
linkcolor=blue
|
||||
]{hyperref}
|
||||
\else
|
||||
\usepackage[ps2pdf,
|
||||
pagebackref=true,
|
||||
colorlinks=true,
|
||||
linkcolor=blue
|
||||
]{hyperref}
|
||||
\usepackage{pspicture}
|
||||
\fi
|
||||
\usepackage{doxygen}
|
||||
\makeindex
|
||||
\setcounter{tocdepth}{1}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
\begin{document}
|
||||
\begin{titlepage}
|
||||
\vspace*{7cm}
|
||||
\begin{center}
|
||||
{\Large Paradis\-EO-PEO Lesson1 Reference Manual\\[1ex]\large 0.1 }\\
|
||||
\vspace*{1cm}
|
||||
{\large Generated by Doxygen 1.4.7}\\
|
||||
\vspace*{0.5cm}
|
||||
{\small Sun Jan 7 18:35:29 2007}\\
|
||||
\end{center}
|
||||
\end{titlepage}
|
||||
\clearemptydoublepage
|
||||
\pagenumbering{roman}
|
||||
\tableofcontents
|
||||
\clearemptydoublepage
|
||||
\pagenumbering{arabic}
|
||||
\chapter{Creating a simple Paradis\-EO-PEO Evolutionary Algorithm }
|
||||
\label{index}\hypertarget{index}{}\input{main}
|
||||
\printindex
|
||||
\end{document}
|
||||