git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@86 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
8af73b559a
commit
e1f4d033ad
55 changed files with 112065 additions and 0 deletions
BIN
trunk/paradiseo-mo/tutorial/docs/latex/FreeSans.ttf
Normal file
BIN
trunk/paradiseo-mo/tutorial/docs/latex/FreeSans.ttf
Normal file
Binary file not shown.
39
trunk/paradiseo-mo/tutorial/docs/latex/Makefile
Normal file
39
trunk/paradiseo-mo/tutorial/docs/latex/Makefile
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
all: clean refman.dvi
|
||||
|
||||
ps: refman.ps
|
||||
|
||||
pdf: refman.pdf
|
||||
|
||||
ps_2on1: refman_2on1.ps
|
||||
|
||||
pdf_2on1: refman_2on1.pdf
|
||||
|
||||
refman.ps: refman.dvi
|
||||
dvips -o refman.ps refman.dvi
|
||||
|
||||
refman.pdf: refman.ps
|
||||
ps2pdf refman.ps refman.pdf
|
||||
|
||||
refman.dvi: refman.tex doxygen.sty
|
||||
echo "Running latex..."
|
||||
latex refman.tex
|
||||
echo "Running makeindex..."
|
||||
makeindex refman.idx
|
||||
echo "Rerunning latex...."
|
||||
latex 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...." ;\
|
||||
latex refman.tex ;\
|
||||
latex_count=`expr $$latex_count - 1` ;\
|
||||
done
|
||||
|
||||
refman_2on1.ps: refman.ps
|
||||
psnup -2 refman.ps >refman_2on1.ps
|
||||
|
||||
refman_2on1.pdf: refman_2on1.ps
|
||||
ps2pdf refman_2on1.ps refman_2on1.pdf
|
||||
|
||||
clean:
|
||||
rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out refman.pdf
|
||||
31
trunk/paradiseo-mo/tutorial/docs/latex/annotated.tex
Normal file
31
trunk/paradiseo-mo/tutorial/docs/latex/annotated.tex
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
\section{PARADISEO-MO Class List}
|
||||
Here are the classes, structs, unions and interfaces with brief descriptions:\begin{CompactList}
|
||||
\item\contentsline{section}{{\bf Empty\-Selection} (Special class that describes the case of no selection )}{\pageref{class_empty_selection}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Algo$<$ EOT $>$} (Description of an algorithm of the mo library )}{\pageref{classmo_algo}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Aspir\-Crit$<$ M $>$} (Description of the conditions in which a tabu move could be accepted )}{\pageref{classmo_aspir_crit}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Best\-Impr\-Select$<$ M $>$} (One of the possible \doxyref{mo\-Move\-Select}{p.}{classmo_move_select} )}{\pageref{classmo_best_impr_select}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Cool\-Sched} (This class gives the description of a cooling schedule )}{\pageref{classmo_cool_sched}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Easy\-Cool\-Sched} (One of the possible \doxyref{mo\-Cool\-Sched}{p.}{classmo_cool_sched} )}{\pageref{classmo_easy_cool_sched}}{}
|
||||
\item\contentsline{section}{{\bf mo\-First\-Impr\-Select$<$ M $>$} (One possible \doxyref{mo\-Move\-Select}{p.}{classmo_move_select} )}{\pageref{classmo_first_impr_select}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Gen\-Sol\-Continue$<$ EOT $>$} (One possible stop criterion for a solution-based heuristic )}{\pageref{classmo_gen_sol_continue}}{}
|
||||
\item\contentsline{section}{{\bf mo\-HC$<$ M $>$} (Hill Climbing (HC) )}{\pageref{classmo_h_c}}{}
|
||||
\item\contentsline{section}{{\bf mo\-HCMove\-Loop\-Expl$<$ M $>$} (Iterative explorer used by a \doxyref{mo\-HC}{p.}{classmo_h_c} )}{\pageref{classmo_h_c_move_loop_expl}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Impr\-Best\-Fit\-Aspir\-Crit$<$ M $>$} (One of the possible \doxyref{mo\-Aspir\-Crit}{p.}{classmo_aspir_crit} )}{\pageref{classmo_impr_best_fit_aspir_crit}}{}
|
||||
\item\contentsline{section}{{\bf mo\-It\-Rand\-Next\-Move$<$ M $>$} (One of the possible \doxyref{mo\-Next\-Move}{p.}{classmo_next_move} )}{\pageref{classmo_it_rand_next_move}}{}
|
||||
\item\contentsline{section}{{\bf mo\-LSCheck\-Point$<$ M $>$} (Class which allows a checkpointing system )}{\pageref{classmo_l_s_check_point}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Move$<$ EOT $>$} (Definition of a move )}{\pageref{classmo_move}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Move\-Expl$<$ M $>$} (Description of a move (\doxyref{mo\-Move}{p.}{classmo_move}) explorer )}{\pageref{classmo_move_expl}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Move\-Incr\-Eval$<$ M $>$} ((generally) Efficient evaluation function based a move and a solution )}{\pageref{classmo_move_incr_eval}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Move\-Init$<$ M $>$} (Move (\doxyref{mo\-Move}{p.}{classmo_move}) initializer )}{\pageref{classmo_move_init}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Move\-Loop\-Expl$<$ M $>$} (Class which describes an iterative explorer )}{\pageref{classmo_move_loop_expl}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Move\-Select$<$ M $>$} (Class that describes a move selector (\doxyref{mo\-Move}{p.}{classmo_move}) )}{\pageref{classmo_move_select}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Next\-Move$<$ M $>$} (Class which allows to generate a new move (\doxyref{mo\-Move}{p.}{classmo_move}) )}{\pageref{classmo_next_move}}{}
|
||||
\item\contentsline{section}{{\bf mo\-No\-Aspir\-Crit$<$ M $>$} (One of the possible aspiration criterion (\doxyref{mo\-Aspir\-Crit}{p.}{classmo_aspir_crit}) )}{\pageref{classmo_no_aspir_crit}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Rand\-Impr\-Select$<$ M $>$} (One of the possible \doxyref{mo\-Move}{p.}{classmo_move} selector (\doxyref{mo\-Move\-Select}{p.}{classmo_move_select}) )}{\pageref{classmo_rand_impr_select}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Rand\-Move$<$ M $>$} (Random move generator )}{\pageref{classmo_rand_move}}{}
|
||||
\item\contentsline{section}{{\bf mo\-SA$<$ M $>$} (Simulated Annealing (SA) )}{\pageref{classmo_s_a}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Sol\-Continue$<$ EOT $>$} (Class that describes a stop criterion for a solution-based heuristic )}{\pageref{classmo_sol_continue}}{}
|
||||
\item\contentsline{section}{{\bf mo\-Tabu\-List$<$ M $>$} (Class describing a tabu list that a \doxyref{mo\-TS}{p.}{classmo_t_s} uses )}{\pageref{classmo_tabu_list}}{}
|
||||
\item\contentsline{section}{{\bf mo\-TS$<$ M $>$} (Tabu Search (TS) )}{\pageref{classmo_t_s}}{}
|
||||
\item\contentsline{section}{{\bf mo\-TSMove\-Loop\-Expl$<$ M $>$} (Explorer for a Tabu Search algorithm )}{\pageref{classmo_t_s_move_loop_expl}}{}
|
||||
\end{CompactList}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
\section{Empty\-Selection Class Reference}
|
||||
\label{class_empty_selection}\index{EmptySelection@{EmptySelection}}
|
||||
Special class that describes the case of no selection.
|
||||
|
||||
|
||||
{\tt \#include $<$mo\-Move\-Select.h$>$}
|
||||
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
Special class that describes the case of no selection.
|
||||
|
||||
This class is used as an exception that can be thrown if a solution selector has completly failed.
|
||||
|
||||
|
||||
|
||||
Definition at line 21 of file mo\-Move\-Select.h.
|
||||
|
||||
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
||||
\item
|
||||
mo\-Move\-Select.h\end{CompactItemize}
|
||||
23
trunk/paradiseo-mo/tutorial/docs/latex/classmo_algo.tex
Normal file
23
trunk/paradiseo-mo/tutorial/docs/latex/classmo_algo.tex
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
\section{mo\-Algo$<$ EOT $>$ Class Template Reference}
|
||||
\label{classmo_algo}\index{moAlgo@{moAlgo}}
|
||||
Description of an algorithm of the mo library.
|
||||
|
||||
|
||||
{\tt \#include $<$mo\-Algo.h$>$}
|
||||
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
\subsubsection*{template$<$class EOT$>$ class mo\-Algo$<$ EOT $>$}
|
||||
|
||||
Description of an algorithm of the mo library.
|
||||
|
||||
\doxyref{mo\-HC}{p.}{classmo_h_c}, \doxyref{mo\-TS}{p.}{classmo_t_s} and \doxyref{mo\-SA}{p.}{classmo_s_a} are 3 examples of algorithm of the mo library.
|
||||
|
||||
|
||||
|
||||
Definition at line 21 of file mo\-Algo.h.
|
||||
|
||||
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
||||
\item
|
||||
mo\-Algo.h\end{CompactItemize}
|
||||
203
trunk/paradiseo-mo/tutorial/docs/latex/classmo_aspir_crit.eps
Normal file
203
trunk/paradiseo-mo/tutorial/docs/latex/classmo_aspir_crit.eps
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: ClassName
|
||||
%%Creator: Doxygen
|
||||
%%CreationDate: Time
|
||||
%%For:
|
||||
%Magnification: 1.00
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 500 109.29
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%EndComments
|
||||
|
||||
% ----- variables -----
|
||||
|
||||
/boxwidth 0 def
|
||||
/boxheight 40 def
|
||||
/fontheight 24 def
|
||||
/marginwidth 10 def
|
||||
/distx 20 def
|
||||
/disty 40 def
|
||||
/boundaspect 4.575 def % aspect ratio of the BoundingBox (width/height)
|
||||
/boundx 500 def
|
||||
/boundy boundx boundaspect div def
|
||||
/xspacing 0 def
|
||||
/yspacing 0 def
|
||||
/rows 2 def
|
||||
/cols 2 def
|
||||
/scalefactor 0 def
|
||||
/boxfont /Times-Roman findfont fontheight scalefont def
|
||||
|
||||
% ----- procedures -----
|
||||
|
||||
/dotted { [1 4] 0 setdash } def
|
||||
/dashed { [5] 0 setdash } def
|
||||
/solid { [] 0 setdash } def
|
||||
|
||||
/max % result = MAX(arg1,arg2)
|
||||
{
|
||||
/a exch def
|
||||
/b exch def
|
||||
a b gt {a} {b} ifelse
|
||||
} def
|
||||
|
||||
/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)
|
||||
{
|
||||
0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max
|
||||
} def
|
||||
|
||||
/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))
|
||||
{
|
||||
/str exch def
|
||||
/boxwidth boxwidth str stringwidth pop max def
|
||||
} def
|
||||
|
||||
/box % draws a box with text `arg1' at grid pos (arg2,arg3)
|
||||
{ gsave
|
||||
2 setlinewidth
|
||||
newpath
|
||||
exch xspacing mul xoffset add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
boxwidth 0 rlineto
|
||||
0 boxheight rlineto
|
||||
boxwidth neg 0 rlineto
|
||||
0 boxheight neg rlineto
|
||||
closepath
|
||||
dup stringwidth pop neg boxwidth add 2 div
|
||||
boxheight fontheight 2 div sub 2 div
|
||||
rmoveto show stroke
|
||||
grestore
|
||||
} def
|
||||
|
||||
/mark
|
||||
{ newpath
|
||||
exch xspacing mul xoffset add boxwidth add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
0 boxheight 4 div rlineto
|
||||
boxheight neg 4 div boxheight neg 4 div rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/arrow
|
||||
{ newpath
|
||||
moveto
|
||||
3 -8 rlineto
|
||||
-6 0 rlineto
|
||||
3 8 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/out % draws an output connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight add
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/in % draws an input connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul disty 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/hedge
|
||||
{
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
newpath
|
||||
x y moveto
|
||||
boxwidth 2 div distx add 0 rlineto
|
||||
stroke
|
||||
1 eq
|
||||
{ newpath x boxwidth 2 div distx add add y moveto
|
||||
-8 3 rlineto
|
||||
0 -6 rlineto
|
||||
8 3 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} if
|
||||
} def
|
||||
|
||||
/vedge
|
||||
{
|
||||
/ye exch def
|
||||
/ys exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add dup
|
||||
ys yspacing mul boxheight 2 div sub
|
||||
moveto
|
||||
ye yspacing mul boxheight 2 div sub
|
||||
lineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
/conn % connections the blocks from col `arg1' to `arg2' of row `arg3'
|
||||
{
|
||||
/ys exch def
|
||||
/xe exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add
|
||||
ys yspacing mul disty 2 div sub
|
||||
moveto
|
||||
xspacing xe xs sub mul 0
|
||||
rlineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
% ----- main ------
|
||||
|
||||
boxfont setfont
|
||||
1 boundaspect scale
|
||||
(moAspirCrit< M >) cw
|
||||
(moImprBestFitAspirCrit< M >) cw
|
||||
(moNoAspirCrit< M >) cw
|
||||
/boxwidth boxwidth marginwidth 2 mul add def
|
||||
/xspacing boxwidth distx add def
|
||||
/yspacing boxheight disty add def
|
||||
/scalefactor
|
||||
boxwidth cols mul distx cols 1 sub mul add
|
||||
boxheight rows mul disty rows 1 sub mul add boundaspect mul
|
||||
max def
|
||||
boundx scalefactor div boundy scalefactor div scale
|
||||
|
||||
% ----- classes -----
|
||||
|
||||
(moAspirCrit< M >) 0.5 1 box
|
||||
(moImprBestFitAspirCrit< M >) 0 0 box
|
||||
(moNoAspirCrit< M >) 1 0 box
|
||||
|
||||
% ----- relations -----
|
||||
|
||||
solid
|
||||
1 0.5 0.25 out
|
||||
solid
|
||||
0 1 1 conn
|
||||
solid
|
||||
0 0 0.75 in
|
||||
solid
|
||||
0 1 0.75 in
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
\section{mo\-Aspir\-Crit$<$ M $>$ Class Template Reference}
|
||||
\label{classmo_aspir_crit}\index{moAspirCrit@{moAspirCrit}}
|
||||
Description of the conditions in which a tabu move could be accepted.
|
||||
|
||||
|
||||
{\tt \#include $<$mo\-Aspir\-Crit.h$>$}
|
||||
|
||||
Inheritance diagram for mo\-Aspir\-Crit$<$ M $>$::\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[height=2cm]{classmo_aspir_crit}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\subsection*{Public Member Functions}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
virtual void {\bf init} ()=0
|
||||
\begin{CompactList}\small\item\em Procedure which initialises all that needs a aspiration criterion. \item\end{CompactList}\end{CompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
\subsubsection*{template$<$class M$>$ class mo\-Aspir\-Crit$<$ M $>$}
|
||||
|
||||
Description of the conditions in which a tabu move could be accepted.
|
||||
|
||||
It is only a description... An object that herits from this class is needed to be used in a \doxyref{mo\-TS}{p.}{classmo_t_s}. See mo\-No\-Aspri\-Crit for example.
|
||||
|
||||
|
||||
|
||||
Definition at line 22 of file mo\-Aspir\-Crit.h.
|
||||
|
||||
\subsection{Member Function Documentation}
|
||||
\index{moAspirCrit@{mo\-Aspir\-Crit}!init@{init}}
|
||||
\index{init@{init}!moAspirCrit@{mo\-Aspir\-Crit}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ virtual void {\bf mo\-Aspir\-Crit}$<$ M $>$::init ()\hspace{0.3cm}{\tt [pure virtual]}}\label{classmo_aspir_crit_a8ce84510a5ec7c9078381e542c6d140}
|
||||
|
||||
|
||||
Procedure which initialises all that needs a aspiration criterion.
|
||||
|
||||
It can be possible that this procedure do nothing...
|
||||
|
||||
Implemented in {\bf mo\-Impr\-Best\-Fit\-Aspir\-Crit$<$ M $>$} \doxyref{}{p.}{classmo_impr_best_fit_aspir_crit_ffa451a14ff4ea86fb8bd9fdbc348630}, and {\bf mo\-No\-Aspir\-Crit$<$ M $>$} \doxyref{}{p.}{classmo_no_aspir_crit_f3a286fc4c2d36bd390ba9a3074f3037}.
|
||||
|
||||
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
||||
\item
|
||||
mo\-Aspir\-Crit.h\end{CompactItemize}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: ClassName
|
||||
%%Creator: Doxygen
|
||||
%%CreationDate: Time
|
||||
%%For:
|
||||
%Magnification: 1.00
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 500 259.74
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%EndComments
|
||||
|
||||
% ----- variables -----
|
||||
|
||||
/boxwidth 0 def
|
||||
/boxheight 40 def
|
||||
/fontheight 24 def
|
||||
/marginwidth 10 def
|
||||
/distx 20 def
|
||||
/disty 40 def
|
||||
/boundaspect 1.925 def % aspect ratio of the BoundingBox (width/height)
|
||||
/boundx 500 def
|
||||
/boundy boundx boundaspect div def
|
||||
/xspacing 0 def
|
||||
/yspacing 0 def
|
||||
/rows 2 def
|
||||
/cols 1 def
|
||||
/scalefactor 0 def
|
||||
/boxfont /Times-Roman findfont fontheight scalefont def
|
||||
|
||||
% ----- procedures -----
|
||||
|
||||
/dotted { [1 4] 0 setdash } def
|
||||
/dashed { [5] 0 setdash } def
|
||||
/solid { [] 0 setdash } def
|
||||
|
||||
/max % result = MAX(arg1,arg2)
|
||||
{
|
||||
/a exch def
|
||||
/b exch def
|
||||
a b gt {a} {b} ifelse
|
||||
} def
|
||||
|
||||
/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)
|
||||
{
|
||||
0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max
|
||||
} def
|
||||
|
||||
/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))
|
||||
{
|
||||
/str exch def
|
||||
/boxwidth boxwidth str stringwidth pop max def
|
||||
} def
|
||||
|
||||
/box % draws a box with text `arg1' at grid pos (arg2,arg3)
|
||||
{ gsave
|
||||
2 setlinewidth
|
||||
newpath
|
||||
exch xspacing mul xoffset add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
boxwidth 0 rlineto
|
||||
0 boxheight rlineto
|
||||
boxwidth neg 0 rlineto
|
||||
0 boxheight neg rlineto
|
||||
closepath
|
||||
dup stringwidth pop neg boxwidth add 2 div
|
||||
boxheight fontheight 2 div sub 2 div
|
||||
rmoveto show stroke
|
||||
grestore
|
||||
} def
|
||||
|
||||
/mark
|
||||
{ newpath
|
||||
exch xspacing mul xoffset add boxwidth add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
0 boxheight 4 div rlineto
|
||||
boxheight neg 4 div boxheight neg 4 div rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/arrow
|
||||
{ newpath
|
||||
moveto
|
||||
3 -8 rlineto
|
||||
-6 0 rlineto
|
||||
3 8 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/out % draws an output connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight add
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/in % draws an input connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul disty 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/hedge
|
||||
{
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
newpath
|
||||
x y moveto
|
||||
boxwidth 2 div distx add 0 rlineto
|
||||
stroke
|
||||
1 eq
|
||||
{ newpath x boxwidth 2 div distx add add y moveto
|
||||
-8 3 rlineto
|
||||
0 -6 rlineto
|
||||
8 3 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} if
|
||||
} def
|
||||
|
||||
/vedge
|
||||
{
|
||||
/ye exch def
|
||||
/ys exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add dup
|
||||
ys yspacing mul boxheight 2 div sub
|
||||
moveto
|
||||
ye yspacing mul boxheight 2 div sub
|
||||
lineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
/conn % connections the blocks from col `arg1' to `arg2' of row `arg3'
|
||||
{
|
||||
/ys exch def
|
||||
/xe exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add
|
||||
ys yspacing mul disty 2 div sub
|
||||
moveto
|
||||
xspacing xe xs sub mul 0
|
||||
rlineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
% ----- main ------
|
||||
|
||||
boxfont setfont
|
||||
1 boundaspect scale
|
||||
(moBestImprSelect< M >) cw
|
||||
(moMoveSelect< M >) cw
|
||||
/boxwidth boxwidth marginwidth 2 mul add def
|
||||
/xspacing boxwidth distx add def
|
||||
/yspacing boxheight disty add def
|
||||
/scalefactor
|
||||
boxwidth cols mul distx cols 1 sub mul add
|
||||
boxheight rows mul disty rows 1 sub mul add boundaspect mul
|
||||
max def
|
||||
boundx scalefactor div boundy scalefactor div scale
|
||||
|
||||
% ----- classes -----
|
||||
|
||||
(moBestImprSelect< M >) 0 0 box
|
||||
(moMoveSelect< M >) 0 1 box
|
||||
|
||||
% ----- relations -----
|
||||
|
||||
solid
|
||||
0 0 0 out
|
||||
solid
|
||||
1 0 1 in
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
\section{mo\-Best\-Impr\-Select$<$ M $>$ Class Template Reference}
|
||||
\label{classmo_best_impr_select}\index{moBestImprSelect@{moBestImprSelect}}
|
||||
One of the possible \doxyref{mo\-Move\-Select}{p.}{classmo_move_select}.
|
||||
|
||||
|
||||
{\tt \#include $<$mo\-Best\-Impr\-Select.h$>$}
|
||||
|
||||
Inheritance diagram for mo\-Best\-Impr\-Select$<$ M $>$::\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[height=2cm]{classmo_best_impr_select}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\subsection*{Public Types}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
typedef M::EOType::Fitness {\bf Fitness}\label{classmo_best_impr_select_c4ae17435221fb0a8e8acd285210cfcb}
|
||||
|
||||
\begin{CompactList}\small\item\em Alias for the fitness. \item\end{CompactList}\end{CompactItemize}
|
||||
\subsection*{Public Member Functions}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
void {\bf init} (const {\bf Fitness} \&\_\-\_\-fit)\label{classmo_best_impr_select_2d2abf9aa17dc77cbb4f41810ab7b956}
|
||||
|
||||
\begin{CompactList}\small\item\em Procedure which initialise the exploration. \item\end{CompactList}\item
|
||||
bool {\bf update} (const M \&\_\-\_\-move, const {\bf Fitness} \&\_\-\_\-fit)
|
||||
\begin{CompactList}\small\item\em Function that indicates if the current move has not improved the fitness. \item\end{CompactList}\item
|
||||
void {\bf operator()} (M \&\_\-\_\-move, {\bf Fitness} \&\_\-\_\-fit) throw (Empty\-Selection)
|
||||
\begin{CompactList}\small\item\em Procedure which saved the best move and fitness. \item\end{CompactList}\end{CompactItemize}
|
||||
\subsection*{Private Attributes}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
bool {\bf first\_\-time}\label{classmo_best_impr_select_352b14d206b0772eb9f40efb7beb0f13}
|
||||
|
||||
\begin{CompactList}\small\item\em Allowing to know if at least one move has been generated. \item\end{CompactList}\item
|
||||
M {\bf best\_\-move}\label{classmo_best_impr_select_bd86f70519f954c07ff0d8a2a3a8ff6a}
|
||||
|
||||
\begin{CompactList}\small\item\em The best move. \item\end{CompactList}\item
|
||||
{\bf Fitness} {\bf best\_\-fit}\label{classmo_best_impr_select_dcac897424b5805f146bb1dbb429f2fe}
|
||||
|
||||
\begin{CompactList}\small\item\em The best fitness. \item\end{CompactList}\end{CompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
\subsubsection*{template$<$class M$>$ class mo\-Best\-Impr\-Select$<$ M $>$}
|
||||
|
||||
One of the possible \doxyref{mo\-Move\-Select}{p.}{classmo_move_select}.
|
||||
|
||||
All neighbors are considered, and the movement which enables the best improvement is selected.
|
||||
|
||||
|
||||
|
||||
Definition at line 22 of file mo\-Best\-Impr\-Select.h.
|
||||
|
||||
\subsection{Member Function Documentation}
|
||||
\index{moBestImprSelect@{mo\-Best\-Impr\-Select}!update@{update}}
|
||||
\index{update@{update}!moBestImprSelect@{mo\-Best\-Impr\-Select}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ bool {\bf mo\-Best\-Impr\-Select}$<$ M $>$::update (const M \& {\em \_\-\_\-move}, const {\bf Fitness} \& {\em \_\-\_\-fit})\hspace{0.3cm}{\tt [inline, virtual]}}\label{classmo_best_impr_select_d10e3e6f8a0277731e95ef506d064d6d}
|
||||
|
||||
|
||||
Function that indicates if the current move has not improved the fitness.
|
||||
|
||||
If the given fitness enables an improvment, the move (\doxyref{mo\-Move}{p.}{classmo_move}) and the fitness linked to this move are saved.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-move}]a move. \item[{\em \_\-\_\-fit}]a fitness linked to the move. \end{description}
|
||||
\end{Desc}
|
||||
\begin{Desc}
|
||||
\item[Returns:]TRUE if the move does not improve the fitness. \end{Desc}
|
||||
|
||||
|
||||
Implements {\bf mo\-Move\-Select$<$ M $>$} \doxyref{}{p.}{classmo_move_select_7c157b6e64fd417acf6e900059204eb1}.
|
||||
|
||||
Definition at line 47 of file mo\-Best\-Impr\-Select.h.
|
||||
|
||||
References mo\-Best\-Impr\-Select$<$ M $>$::best\_\-fit, mo\-Best\-Impr\-Select$<$ M $>$::best\_\-move, and mo\-Best\-Impr\-Select$<$ M $>$::first\_\-time.\index{moBestImprSelect@{mo\-Best\-Impr\-Select}!operator()@{operator()}}
|
||||
\index{operator()@{operator()}!moBestImprSelect@{mo\-Best\-Impr\-Select}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ void {\bf mo\-Best\-Impr\-Select}$<$ M $>$::operator() (M \& {\em \_\-\_\-move}, {\bf Fitness} \& {\em \_\-\_\-fit}) throw ({\bf Empty\-Selection})\hspace{0.3cm}{\tt [inline]}}\label{classmo_best_impr_select_169773d4d127acd782cf379f758222da}
|
||||
|
||||
|
||||
Procedure which saved the best move and fitness.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-move}]the current move (result of the procedure). \item[{\em \_\-\_\-fit}]the current fitness (result of the procedure). \end{description}
|
||||
\end{Desc}
|
||||
\begin{Desc}
|
||||
\item[Exceptions:]
|
||||
\begin{description}
|
||||
\item[{\em \doxyref{Empty\-Selection}{p.}{class_empty_selection}}]if no move has improved the fitness. \end{description}
|
||||
\end{Desc}
|
||||
|
||||
|
||||
Definition at line 68 of file mo\-Best\-Impr\-Select.h.
|
||||
|
||||
References mo\-Best\-Impr\-Select$<$ M $>$::best\_\-fit, mo\-Best\-Impr\-Select$<$ M $>$::best\_\-move, and mo\-Best\-Impr\-Select$<$ M $>$::first\_\-time.
|
||||
|
||||
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
||||
\item
|
||||
mo\-Best\-Impr\-Select.h\end{CompactItemize}
|
||||
197
trunk/paradiseo-mo/tutorial/docs/latex/classmo_cool_sched.eps
Normal file
197
trunk/paradiseo-mo/tutorial/docs/latex/classmo_cool_sched.eps
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: ClassName
|
||||
%%Creator: Doxygen
|
||||
%%CreationDate: Time
|
||||
%%For:
|
||||
%Magnification: 1.00
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 500 317.46
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%EndComments
|
||||
|
||||
% ----- variables -----
|
||||
|
||||
/boxwidth 0 def
|
||||
/boxheight 40 def
|
||||
/fontheight 24 def
|
||||
/marginwidth 10 def
|
||||
/distx 20 def
|
||||
/disty 40 def
|
||||
/boundaspect 1.575 def % aspect ratio of the BoundingBox (width/height)
|
||||
/boundx 500 def
|
||||
/boundy boundx boundaspect div def
|
||||
/xspacing 0 def
|
||||
/yspacing 0 def
|
||||
/rows 2 def
|
||||
/cols 1 def
|
||||
/scalefactor 0 def
|
||||
/boxfont /Times-Roman findfont fontheight scalefont def
|
||||
|
||||
% ----- procedures -----
|
||||
|
||||
/dotted { [1 4] 0 setdash } def
|
||||
/dashed { [5] 0 setdash } def
|
||||
/solid { [] 0 setdash } def
|
||||
|
||||
/max % result = MAX(arg1,arg2)
|
||||
{
|
||||
/a exch def
|
||||
/b exch def
|
||||
a b gt {a} {b} ifelse
|
||||
} def
|
||||
|
||||
/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)
|
||||
{
|
||||
0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max
|
||||
} def
|
||||
|
||||
/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))
|
||||
{
|
||||
/str exch def
|
||||
/boxwidth boxwidth str stringwidth pop max def
|
||||
} def
|
||||
|
||||
/box % draws a box with text `arg1' at grid pos (arg2,arg3)
|
||||
{ gsave
|
||||
2 setlinewidth
|
||||
newpath
|
||||
exch xspacing mul xoffset add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
boxwidth 0 rlineto
|
||||
0 boxheight rlineto
|
||||
boxwidth neg 0 rlineto
|
||||
0 boxheight neg rlineto
|
||||
closepath
|
||||
dup stringwidth pop neg boxwidth add 2 div
|
||||
boxheight fontheight 2 div sub 2 div
|
||||
rmoveto show stroke
|
||||
grestore
|
||||
} def
|
||||
|
||||
/mark
|
||||
{ newpath
|
||||
exch xspacing mul xoffset add boxwidth add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
0 boxheight 4 div rlineto
|
||||
boxheight neg 4 div boxheight neg 4 div rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/arrow
|
||||
{ newpath
|
||||
moveto
|
||||
3 -8 rlineto
|
||||
-6 0 rlineto
|
||||
3 8 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/out % draws an output connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight add
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/in % draws an input connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul disty 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/hedge
|
||||
{
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
newpath
|
||||
x y moveto
|
||||
boxwidth 2 div distx add 0 rlineto
|
||||
stroke
|
||||
1 eq
|
||||
{ newpath x boxwidth 2 div distx add add y moveto
|
||||
-8 3 rlineto
|
||||
0 -6 rlineto
|
||||
8 3 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} if
|
||||
} def
|
||||
|
||||
/vedge
|
||||
{
|
||||
/ye exch def
|
||||
/ys exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add dup
|
||||
ys yspacing mul boxheight 2 div sub
|
||||
moveto
|
||||
ye yspacing mul boxheight 2 div sub
|
||||
lineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
/conn % connections the blocks from col `arg1' to `arg2' of row `arg3'
|
||||
{
|
||||
/ys exch def
|
||||
/xe exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add
|
||||
ys yspacing mul disty 2 div sub
|
||||
moveto
|
||||
xspacing xe xs sub mul 0
|
||||
rlineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
% ----- main ------
|
||||
|
||||
boxfont setfont
|
||||
1 boundaspect scale
|
||||
(moCoolSched) cw
|
||||
(moEasyCoolSched) cw
|
||||
/boxwidth boxwidth marginwidth 2 mul add def
|
||||
/xspacing boxwidth distx add def
|
||||
/yspacing boxheight disty add def
|
||||
/scalefactor
|
||||
boxwidth cols mul distx cols 1 sub mul add
|
||||
boxheight rows mul disty rows 1 sub mul add boundaspect mul
|
||||
max def
|
||||
boundx scalefactor div boundy scalefactor div scale
|
||||
|
||||
% ----- classes -----
|
||||
|
||||
(moCoolSched) 0 1 box
|
||||
(moEasyCoolSched) 0 0 box
|
||||
|
||||
% ----- relations -----
|
||||
|
||||
solid
|
||||
1 0 0.25 out
|
||||
solid
|
||||
0 0 0.75 in
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
\section{mo\-Cool\-Sched Class Reference}
|
||||
\label{classmo_cool_sched}\index{moCoolSched@{moCoolSched}}
|
||||
This class gives the description of a cooling schedule.
|
||||
|
||||
|
||||
{\tt \#include $<$mo\-Cool\-Sched.h$>$}
|
||||
|
||||
Inheritance diagram for mo\-Cool\-Sched::\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[height=2cm]{classmo_cool_sched}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
This class gives the description of a cooling schedule.
|
||||
|
||||
It is only a description... An object that herits from this class is needed to be used in a \doxyref{mo\-SA}{p.}{classmo_s_a}. See \doxyref{mo\-Easy\-Cool\-Sched}{p.}{classmo_easy_cool_sched} for example.
|
||||
|
||||
|
||||
|
||||
Definition at line 22 of file mo\-Cool\-Sched.h.
|
||||
|
||||
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
||||
\item
|
||||
mo\-Cool\-Sched.h\end{CompactItemize}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: ClassName
|
||||
%%Creator: Doxygen
|
||||
%%CreationDate: Time
|
||||
%%For:
|
||||
%Magnification: 1.00
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 500 317.46
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%EndComments
|
||||
|
||||
% ----- variables -----
|
||||
|
||||
/boxwidth 0 def
|
||||
/boxheight 40 def
|
||||
/fontheight 24 def
|
||||
/marginwidth 10 def
|
||||
/distx 20 def
|
||||
/disty 40 def
|
||||
/boundaspect 1.575 def % aspect ratio of the BoundingBox (width/height)
|
||||
/boundx 500 def
|
||||
/boundy boundx boundaspect div def
|
||||
/xspacing 0 def
|
||||
/yspacing 0 def
|
||||
/rows 2 def
|
||||
/cols 1 def
|
||||
/scalefactor 0 def
|
||||
/boxfont /Times-Roman findfont fontheight scalefont def
|
||||
|
||||
% ----- procedures -----
|
||||
|
||||
/dotted { [1 4] 0 setdash } def
|
||||
/dashed { [5] 0 setdash } def
|
||||
/solid { [] 0 setdash } def
|
||||
|
||||
/max % result = MAX(arg1,arg2)
|
||||
{
|
||||
/a exch def
|
||||
/b exch def
|
||||
a b gt {a} {b} ifelse
|
||||
} def
|
||||
|
||||
/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)
|
||||
{
|
||||
0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max
|
||||
} def
|
||||
|
||||
/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))
|
||||
{
|
||||
/str exch def
|
||||
/boxwidth boxwidth str stringwidth pop max def
|
||||
} def
|
||||
|
||||
/box % draws a box with text `arg1' at grid pos (arg2,arg3)
|
||||
{ gsave
|
||||
2 setlinewidth
|
||||
newpath
|
||||
exch xspacing mul xoffset add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
boxwidth 0 rlineto
|
||||
0 boxheight rlineto
|
||||
boxwidth neg 0 rlineto
|
||||
0 boxheight neg rlineto
|
||||
closepath
|
||||
dup stringwidth pop neg boxwidth add 2 div
|
||||
boxheight fontheight 2 div sub 2 div
|
||||
rmoveto show stroke
|
||||
grestore
|
||||
} def
|
||||
|
||||
/mark
|
||||
{ newpath
|
||||
exch xspacing mul xoffset add boxwidth add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
0 boxheight 4 div rlineto
|
||||
boxheight neg 4 div boxheight neg 4 div rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/arrow
|
||||
{ newpath
|
||||
moveto
|
||||
3 -8 rlineto
|
||||
-6 0 rlineto
|
||||
3 8 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/out % draws an output connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight add
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/in % draws an input connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul disty 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/hedge
|
||||
{
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
newpath
|
||||
x y moveto
|
||||
boxwidth 2 div distx add 0 rlineto
|
||||
stroke
|
||||
1 eq
|
||||
{ newpath x boxwidth 2 div distx add add y moveto
|
||||
-8 3 rlineto
|
||||
0 -6 rlineto
|
||||
8 3 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} if
|
||||
} def
|
||||
|
||||
/vedge
|
||||
{
|
||||
/ye exch def
|
||||
/ys exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add dup
|
||||
ys yspacing mul boxheight 2 div sub
|
||||
moveto
|
||||
ye yspacing mul boxheight 2 div sub
|
||||
lineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
/conn % connections the blocks from col `arg1' to `arg2' of row `arg3'
|
||||
{
|
||||
/ys exch def
|
||||
/xe exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add
|
||||
ys yspacing mul disty 2 div sub
|
||||
moveto
|
||||
xspacing xe xs sub mul 0
|
||||
rlineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
% ----- main ------
|
||||
|
||||
boxfont setfont
|
||||
1 boundaspect scale
|
||||
(moEasyCoolSched) cw
|
||||
(moCoolSched) cw
|
||||
/boxwidth boxwidth marginwidth 2 mul add def
|
||||
/xspacing boxwidth distx add def
|
||||
/yspacing boxheight disty add def
|
||||
/scalefactor
|
||||
boxwidth cols mul distx cols 1 sub mul add
|
||||
boxheight rows mul disty rows 1 sub mul add boundaspect mul
|
||||
max def
|
||||
boundx scalefactor div boundy scalefactor div scale
|
||||
|
||||
% ----- classes -----
|
||||
|
||||
(moEasyCoolSched) 0 0 box
|
||||
(moCoolSched) 0 1 box
|
||||
|
||||
% ----- relations -----
|
||||
|
||||
solid
|
||||
0 0 0 out
|
||||
solid
|
||||
1 0 1 in
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
\section{mo\-Easy\-Cool\-Sched Class Reference}
|
||||
\label{classmo_easy_cool_sched}\index{moEasyCoolSched@{moEasyCoolSched}}
|
||||
One of the possible \doxyref{mo\-Cool\-Sched}{p.}{classmo_cool_sched}.
|
||||
|
||||
|
||||
{\tt \#include $<$mo\-Easy\-Cool\-Sched.h$>$}
|
||||
|
||||
Inheritance diagram for mo\-Easy\-Cool\-Sched::\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[height=2cm]{classmo_easy_cool_sched}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\subsection*{Public Member Functions}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
{\bf mo\-Easy\-Cool\-Sched} (double \_\-\_\-threshold, double \_\-\_\-ratio)
|
||||
\begin{CompactList}\small\item\em Simple constructor. \item\end{CompactList}\item
|
||||
bool {\bf operator()} (double \&\_\-\_\-temp)
|
||||
\begin{CompactList}\small\item\em Function which proceeds to the cooling. \item\end{CompactList}\end{CompactItemize}
|
||||
\subsection*{Private Attributes}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
double {\bf threshold}\label{classmo_easy_cool_sched_3dd53700390b7bb6428db80e01626c83}
|
||||
|
||||
\begin{CompactList}\small\item\em The temperature threhold. \item\end{CompactList}\item
|
||||
double {\bf ratio}\label{classmo_easy_cool_sched_1f84deff87defafd927e8c323b188f38}
|
||||
|
||||
\begin{CompactList}\small\item\em The decreasing factor of the temperature. \item\end{CompactList}\end{CompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
One of the possible \doxyref{mo\-Cool\-Sched}{p.}{classmo_cool_sched}.
|
||||
|
||||
The simpliest, the temperature decrease according to a ratio until it greater than a threshold.
|
||||
|
||||
|
||||
|
||||
Definition at line 22 of file mo\-Easy\-Cool\-Sched.h.
|
||||
|
||||
\subsection{Constructor \& Destructor Documentation}
|
||||
\index{moEasyCoolSched@{mo\-Easy\-Cool\-Sched}!moEasyCoolSched@{moEasyCoolSched}}
|
||||
\index{moEasyCoolSched@{moEasyCoolSched}!moEasyCoolSched@{mo\-Easy\-Cool\-Sched}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}mo\-Easy\-Cool\-Sched::mo\-Easy\-Cool\-Sched (double {\em \_\-\_\-threshold}, double {\em \_\-\_\-ratio})\hspace{0.3cm}{\tt [inline]}}\label{classmo_easy_cool_sched_c556b41343700293bb17e3b20d81e0f2}
|
||||
|
||||
|
||||
Simple constructor.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-threshold}]the threshold. \item[{\em \_\-\_\-ratio}]the ratio used to descrease the temperature. \end{description}
|
||||
\end{Desc}
|
||||
|
||||
|
||||
Definition at line 31 of file mo\-Easy\-Cool\-Sched.h.
|
||||
|
||||
\subsection{Member Function Documentation}
|
||||
\index{moEasyCoolSched@{mo\-Easy\-Cool\-Sched}!operator()@{operator()}}
|
||||
\index{operator()@{operator()}!moEasyCoolSched@{mo\-Easy\-Cool\-Sched}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool mo\-Easy\-Cool\-Sched::operator() (double \& {\em \_\-\_\-temp})\hspace{0.3cm}{\tt [inline]}}\label{classmo_easy_cool_sched_ca08df878417ef1124e6933a9c2d7a0b}
|
||||
|
||||
|
||||
Function which proceeds to the cooling.
|
||||
|
||||
Decrease the temperature and indicates if it is greater than the threshold.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-temp}]the current temperature. \end{description}
|
||||
\end{Desc}
|
||||
\begin{Desc}
|
||||
\item[Returns:]if the new temperature (current temperature $\ast$ ratio) is greater than the threshold. \end{Desc}
|
||||
|
||||
|
||||
Definition at line 44 of file mo\-Easy\-Cool\-Sched.h.
|
||||
|
||||
References ratio, and threshold.
|
||||
|
||||
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
||||
\item
|
||||
mo\-Easy\-Cool\-Sched.h\end{CompactItemize}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: ClassName
|
||||
%%Creator: Doxygen
|
||||
%%CreationDate: Time
|
||||
%%For:
|
||||
%Magnification: 1.00
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 500 258.065
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%EndComments
|
||||
|
||||
% ----- variables -----
|
||||
|
||||
/boxwidth 0 def
|
||||
/boxheight 40 def
|
||||
/fontheight 24 def
|
||||
/marginwidth 10 def
|
||||
/distx 20 def
|
||||
/disty 40 def
|
||||
/boundaspect 1.9375 def % aspect ratio of the BoundingBox (width/height)
|
||||
/boundx 500 def
|
||||
/boundy boundx boundaspect div def
|
||||
/xspacing 0 def
|
||||
/yspacing 0 def
|
||||
/rows 2 def
|
||||
/cols 1 def
|
||||
/scalefactor 0 def
|
||||
/boxfont /Times-Roman findfont fontheight scalefont def
|
||||
|
||||
% ----- procedures -----
|
||||
|
||||
/dotted { [1 4] 0 setdash } def
|
||||
/dashed { [5] 0 setdash } def
|
||||
/solid { [] 0 setdash } def
|
||||
|
||||
/max % result = MAX(arg1,arg2)
|
||||
{
|
||||
/a exch def
|
||||
/b exch def
|
||||
a b gt {a} {b} ifelse
|
||||
} def
|
||||
|
||||
/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)
|
||||
{
|
||||
0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max
|
||||
} def
|
||||
|
||||
/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))
|
||||
{
|
||||
/str exch def
|
||||
/boxwidth boxwidth str stringwidth pop max def
|
||||
} def
|
||||
|
||||
/box % draws a box with text `arg1' at grid pos (arg2,arg3)
|
||||
{ gsave
|
||||
2 setlinewidth
|
||||
newpath
|
||||
exch xspacing mul xoffset add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
boxwidth 0 rlineto
|
||||
0 boxheight rlineto
|
||||
boxwidth neg 0 rlineto
|
||||
0 boxheight neg rlineto
|
||||
closepath
|
||||
dup stringwidth pop neg boxwidth add 2 div
|
||||
boxheight fontheight 2 div sub 2 div
|
||||
rmoveto show stroke
|
||||
grestore
|
||||
} def
|
||||
|
||||
/mark
|
||||
{ newpath
|
||||
exch xspacing mul xoffset add boxwidth add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
0 boxheight 4 div rlineto
|
||||
boxheight neg 4 div boxheight neg 4 div rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/arrow
|
||||
{ newpath
|
||||
moveto
|
||||
3 -8 rlineto
|
||||
-6 0 rlineto
|
||||
3 8 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/out % draws an output connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight add
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/in % draws an input connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul disty 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/hedge
|
||||
{
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
newpath
|
||||
x y moveto
|
||||
boxwidth 2 div distx add 0 rlineto
|
||||
stroke
|
||||
1 eq
|
||||
{ newpath x boxwidth 2 div distx add add y moveto
|
||||
-8 3 rlineto
|
||||
0 -6 rlineto
|
||||
8 3 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} if
|
||||
} def
|
||||
|
||||
/vedge
|
||||
{
|
||||
/ye exch def
|
||||
/ys exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add dup
|
||||
ys yspacing mul boxheight 2 div sub
|
||||
moveto
|
||||
ye yspacing mul boxheight 2 div sub
|
||||
lineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
/conn % connections the blocks from col `arg1' to `arg2' of row `arg3'
|
||||
{
|
||||
/ys exch def
|
||||
/xe exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add
|
||||
ys yspacing mul disty 2 div sub
|
||||
moveto
|
||||
xspacing xe xs sub mul 0
|
||||
rlineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
% ----- main ------
|
||||
|
||||
boxfont setfont
|
||||
1 boundaspect scale
|
||||
(moFirstImprSelect< M >) cw
|
||||
(moMoveSelect< M >) cw
|
||||
/boxwidth boxwidth marginwidth 2 mul add def
|
||||
/xspacing boxwidth distx add def
|
||||
/yspacing boxheight disty add def
|
||||
/scalefactor
|
||||
boxwidth cols mul distx cols 1 sub mul add
|
||||
boxheight rows mul disty rows 1 sub mul add boundaspect mul
|
||||
max def
|
||||
boundx scalefactor div boundy scalefactor div scale
|
||||
|
||||
% ----- classes -----
|
||||
|
||||
(moFirstImprSelect< M >) 0 0 box
|
||||
(moMoveSelect< M >) 0 1 box
|
||||
|
||||
% ----- relations -----
|
||||
|
||||
solid
|
||||
0 0 0 out
|
||||
solid
|
||||
1 0 1 in
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
\section{mo\-First\-Impr\-Select$<$ M $>$ Class Template Reference}
|
||||
\label{classmo_first_impr_select}\index{moFirstImprSelect@{moFirstImprSelect}}
|
||||
One possible \doxyref{mo\-Move\-Select}{p.}{classmo_move_select}.
|
||||
|
||||
|
||||
{\tt \#include $<$mo\-First\-Impr\-Select.h$>$}
|
||||
|
||||
Inheritance diagram for mo\-First\-Impr\-Select$<$ M $>$::\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[height=2cm]{classmo_first_impr_select}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\subsection*{Public Types}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
typedef M::EOType::Fitness {\bf Fitness}\label{classmo_first_impr_select_64763ce3e6d2873266624382b407fa5a}
|
||||
|
||||
\begin{CompactList}\small\item\em Alias for the fitness. \item\end{CompactList}\end{CompactItemize}
|
||||
\subsection*{Public Member Functions}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
virtual void {\bf init} (const {\bf Fitness} \&\_\-\_\-fit)
|
||||
\begin{CompactList}\small\item\em Procedure which initialise the exploration. \item\end{CompactList}\item
|
||||
bool {\bf update} (const M \&\_\-\_\-move, const typename M::EOType::Fitness \&\_\-\_\-fit)
|
||||
\begin{CompactList}\small\item\em Function that indicates if the current move has not improved the fitness. \item\end{CompactList}\item
|
||||
void {\bf operator()} (M \&\_\-\_\-move, {\bf Fitness} \&\_\-\_\-fit) throw (Empty\-Selection)
|
||||
\begin{CompactList}\small\item\em Procedure which saved the best move and fitness. \item\end{CompactList}\end{CompactItemize}
|
||||
\subsection*{Private Attributes}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
bool {\bf valid}\label{classmo_first_impr_select_a99c0586ba07449234705c17a258d58c}
|
||||
|
||||
\begin{CompactList}\small\item\em Allow to know if at least one move has improved the solution. \item\end{CompactList}\item
|
||||
M {\bf best\_\-move}\label{classmo_first_impr_select_dfed419a608dd7c41f07fa1f1279cb8c}
|
||||
|
||||
\begin{CompactList}\small\item\em Best stored movement. \item\end{CompactList}\item
|
||||
{\bf Fitness} {\bf init\_\-fit}\label{classmo_first_impr_select_ce7ba63e8cc3a9164f4e546477e98ca8}
|
||||
|
||||
\begin{CompactList}\small\item\em Initial fitness. \item\end{CompactList}\item
|
||||
{\bf Fitness} {\bf best\_\-fit}\label{classmo_first_impr_select_e1190347b76ec6fe717be32354b4a9a9}
|
||||
|
||||
\begin{CompactList}\small\item\em Best stored fitness. \item\end{CompactList}\end{CompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
\subsubsection*{template$<$class M$>$ class mo\-First\-Impr\-Select$<$ M $>$}
|
||||
|
||||
One possible \doxyref{mo\-Move\-Select}{p.}{classmo_move_select}.
|
||||
|
||||
The neighborhood is explored until a move enables an improvment of the current solution.
|
||||
|
||||
|
||||
|
||||
Definition at line 23 of file mo\-First\-Impr\-Select.h.
|
||||
|
||||
\subsection{Member Function Documentation}
|
||||
\index{moFirstImprSelect@{mo\-First\-Impr\-Select}!init@{init}}
|
||||
\index{init@{init}!moFirstImprSelect@{mo\-First\-Impr\-Select}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ virtual void {\bf mo\-First\-Impr\-Select}$<$ M $>$::init (const {\bf Fitness} \& {\em \_\-\_\-fit})\hspace{0.3cm}{\tt [inline, virtual]}}\label{classmo_first_impr_select_4c5ce18ede46247a439c68f6954a4055}
|
||||
|
||||
|
||||
Procedure which initialise the exploration.
|
||||
|
||||
It save the current fitness as the initial value for the fitness.
|
||||
|
||||
Implements {\bf mo\-Move\-Select$<$ M $>$} \doxyref{}{p.}{classmo_move_select_bca4c43f13d26eca7163aeb272a4a52e}.
|
||||
|
||||
Definition at line 35 of file mo\-First\-Impr\-Select.h.
|
||||
|
||||
References mo\-First\-Impr\-Select$<$ M $>$::init\_\-fit, and mo\-First\-Impr\-Select$<$ M $>$::valid.\index{moFirstImprSelect@{mo\-First\-Impr\-Select}!update@{update}}
|
||||
\index{update@{update}!moFirstImprSelect@{mo\-First\-Impr\-Select}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ bool {\bf mo\-First\-Impr\-Select}$<$ M $>$::update (const M \& {\em \_\-\_\-move}, const typename M::EOType::Fitness \& {\em \_\-\_\-fit})\hspace{0.3cm}{\tt [inline]}}\label{classmo_first_impr_select_7ba0882728daedc75c249647c070ccf0}
|
||||
|
||||
|
||||
Function that indicates if the current move has not improved the fitness.
|
||||
|
||||
If the given fitness enables an improvment, the move (\doxyref{mo\-Move}{p.}{classmo_move}) should be applied to the current solution.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-move}]a move. \item[{\em \_\-\_\-fit}]a fitness linked to the move. \end{description}
|
||||
\end{Desc}
|
||||
\begin{Desc}
|
||||
\item[Returns:]TRUE if the move does not improve the fitness. \end{Desc}
|
||||
|
||||
|
||||
Definition at line 52 of file mo\-First\-Impr\-Select.h.
|
||||
|
||||
References mo\-First\-Impr\-Select$<$ M $>$::best\_\-fit, mo\-First\-Impr\-Select$<$ M $>$::best\_\-move, mo\-First\-Impr\-Select$<$ M $>$::init\_\-fit, and mo\-First\-Impr\-Select$<$ M $>$::valid.\index{moFirstImprSelect@{mo\-First\-Impr\-Select}!operator()@{operator()}}
|
||||
\index{operator()@{operator()}!moFirstImprSelect@{mo\-First\-Impr\-Select}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ void {\bf mo\-First\-Impr\-Select}$<$ M $>$::operator() (M \& {\em \_\-\_\-move}, {\bf Fitness} \& {\em \_\-\_\-fit}) throw ({\bf Empty\-Selection})\hspace{0.3cm}{\tt [inline]}}\label{classmo_first_impr_select_3be12cf4cbaed00df7c4fa735b2c0a95}
|
||||
|
||||
|
||||
Procedure which saved the best move and fitness.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-move}]the current move (result of the procedure). \item[{\em \_\-\_\-fit}]the current fitness (result of the procedure). \end{description}
|
||||
\end{Desc}
|
||||
\begin{Desc}
|
||||
\item[Exceptions:]
|
||||
\begin{description}
|
||||
\item[{\em \doxyref{Empty\-Selection}{p.}{class_empty_selection}}]if no move has improved the fitness. \end{description}
|
||||
\end{Desc}
|
||||
|
||||
|
||||
Definition at line 76 of file mo\-First\-Impr\-Select.h.
|
||||
|
||||
References mo\-First\-Impr\-Select$<$ M $>$::best\_\-fit, mo\-First\-Impr\-Select$<$ M $>$::best\_\-move, and mo\-First\-Impr\-Select$<$ M $>$::valid.
|
||||
|
||||
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
||||
\item
|
||||
mo\-First\-Impr\-Select.h\end{CompactItemize}
|
||||
|
|
@ -0,0 +1,197 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: ClassName
|
||||
%%Creator: Doxygen
|
||||
%%CreationDate: Time
|
||||
%%For:
|
||||
%Magnification: 1.00
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 500 227.273
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%EndComments
|
||||
|
||||
% ----- variables -----
|
||||
|
||||
/boxwidth 0 def
|
||||
/boxheight 40 def
|
||||
/fontheight 24 def
|
||||
/marginwidth 10 def
|
||||
/distx 20 def
|
||||
/disty 40 def
|
||||
/boundaspect 2.2 def % aspect ratio of the BoundingBox (width/height)
|
||||
/boundx 500 def
|
||||
/boundy boundx boundaspect div def
|
||||
/xspacing 0 def
|
||||
/yspacing 0 def
|
||||
/rows 2 def
|
||||
/cols 1 def
|
||||
/scalefactor 0 def
|
||||
/boxfont /Times-Roman findfont fontheight scalefont def
|
||||
|
||||
% ----- procedures -----
|
||||
|
||||
/dotted { [1 4] 0 setdash } def
|
||||
/dashed { [5] 0 setdash } def
|
||||
/solid { [] 0 setdash } def
|
||||
|
||||
/max % result = MAX(arg1,arg2)
|
||||
{
|
||||
/a exch def
|
||||
/b exch def
|
||||
a b gt {a} {b} ifelse
|
||||
} def
|
||||
|
||||
/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)
|
||||
{
|
||||
0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max
|
||||
} def
|
||||
|
||||
/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))
|
||||
{
|
||||
/str exch def
|
||||
/boxwidth boxwidth str stringwidth pop max def
|
||||
} def
|
||||
|
||||
/box % draws a box with text `arg1' at grid pos (arg2,arg3)
|
||||
{ gsave
|
||||
2 setlinewidth
|
||||
newpath
|
||||
exch xspacing mul xoffset add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
boxwidth 0 rlineto
|
||||
0 boxheight rlineto
|
||||
boxwidth neg 0 rlineto
|
||||
0 boxheight neg rlineto
|
||||
closepath
|
||||
dup stringwidth pop neg boxwidth add 2 div
|
||||
boxheight fontheight 2 div sub 2 div
|
||||
rmoveto show stroke
|
||||
grestore
|
||||
} def
|
||||
|
||||
/mark
|
||||
{ newpath
|
||||
exch xspacing mul xoffset add boxwidth add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
0 boxheight 4 div rlineto
|
||||
boxheight neg 4 div boxheight neg 4 div rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/arrow
|
||||
{ newpath
|
||||
moveto
|
||||
3 -8 rlineto
|
||||
-6 0 rlineto
|
||||
3 8 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/out % draws an output connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight add
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/in % draws an input connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul disty 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/hedge
|
||||
{
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
newpath
|
||||
x y moveto
|
||||
boxwidth 2 div distx add 0 rlineto
|
||||
stroke
|
||||
1 eq
|
||||
{ newpath x boxwidth 2 div distx add add y moveto
|
||||
-8 3 rlineto
|
||||
0 -6 rlineto
|
||||
8 3 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} if
|
||||
} def
|
||||
|
||||
/vedge
|
||||
{
|
||||
/ye exch def
|
||||
/ys exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add dup
|
||||
ys yspacing mul boxheight 2 div sub
|
||||
moveto
|
||||
ye yspacing mul boxheight 2 div sub
|
||||
lineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
/conn % connections the blocks from col `arg1' to `arg2' of row `arg3'
|
||||
{
|
||||
/ys exch def
|
||||
/xe exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add
|
||||
ys yspacing mul disty 2 div sub
|
||||
moveto
|
||||
xspacing xe xs sub mul 0
|
||||
rlineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
% ----- main ------
|
||||
|
||||
boxfont setfont
|
||||
1 boundaspect scale
|
||||
(moGenSolContinue< EOT >) cw
|
||||
(moSolContinue< EOT >) cw
|
||||
/boxwidth boxwidth marginwidth 2 mul add def
|
||||
/xspacing boxwidth distx add def
|
||||
/yspacing boxheight disty add def
|
||||
/scalefactor
|
||||
boxwidth cols mul distx cols 1 sub mul add
|
||||
boxheight rows mul disty rows 1 sub mul add boundaspect mul
|
||||
max def
|
||||
boundx scalefactor div boundy scalefactor div scale
|
||||
|
||||
% ----- classes -----
|
||||
|
||||
(moGenSolContinue< EOT >) 0 0 box
|
||||
(moSolContinue< EOT >) 0 1 box
|
||||
|
||||
% ----- relations -----
|
||||
|
||||
solid
|
||||
0 0 0 out
|
||||
solid
|
||||
1 0 1 in
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
\section{mo\-Gen\-Sol\-Continue$<$ EOT $>$ Class Template Reference}
|
||||
\label{classmo_gen_sol_continue}\index{moGenSolContinue@{moGenSolContinue}}
|
||||
One possible stop criterion for a solution-based heuristic.
|
||||
|
||||
|
||||
{\tt \#include $<$mo\-Gen\-Sol\-Continue.h$>$}
|
||||
|
||||
Inheritance diagram for mo\-Gen\-Sol\-Continue$<$ EOT $>$::\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[height=2cm]{classmo_gen_sol_continue}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\subsection*{Public Member Functions}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
{\bf mo\-Gen\-Sol\-Continue} (unsigned \_\-\_\-max\-Num\-Gen)
|
||||
\begin{CompactList}\small\item\em Simple constructor. \item\end{CompactList}\item
|
||||
bool {\bf operator()} (const EOT \&\_\-\_\-sol)
|
||||
\begin{CompactList}\small\item\em Function that activates the stop criterion. \item\end{CompactList}\item
|
||||
void {\bf init} ()
|
||||
\begin{CompactList}\small\item\em Procedure which allows to initialise the generation counter. \item\end{CompactList}\end{CompactItemize}
|
||||
\subsection*{Private Attributes}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
unsigned {\bf max\-Num\-Gen}\label{classmo_gen_sol_continue_6d7674fc51d17423e8ee28693a08b5af}
|
||||
|
||||
\begin{CompactList}\small\item\em Iteration maximum number. \item\end{CompactList}\item
|
||||
unsigned {\bf num\-Gen}\label{classmo_gen_sol_continue_a18ebfd270f96517b4edaa2cad3eb9e0}
|
||||
|
||||
\begin{CompactList}\small\item\em Iteration current number. \item\end{CompactList}\end{CompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
\subsubsection*{template$<$class EOT$>$ class mo\-Gen\-Sol\-Continue$<$ EOT $>$}
|
||||
|
||||
One possible stop criterion for a solution-based heuristic.
|
||||
|
||||
The stop criterion corresponds to a maximum number of iteration.
|
||||
|
||||
|
||||
|
||||
Definition at line 21 of file mo\-Gen\-Sol\-Continue.h.
|
||||
|
||||
\subsection{Constructor \& Destructor Documentation}
|
||||
\index{moGenSolContinue@{mo\-Gen\-Sol\-Continue}!moGenSolContinue@{moGenSolContinue}}
|
||||
\index{moGenSolContinue@{moGenSolContinue}!moGenSolContinue@{mo\-Gen\-Sol\-Continue}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class EOT$>$ {\bf mo\-Gen\-Sol\-Continue}$<$ EOT $>$::{\bf mo\-Gen\-Sol\-Continue} (unsigned {\em \_\-\_\-max\-Num\-Gen})\hspace{0.3cm}{\tt [inline]}}\label{classmo_gen_sol_continue_6b6cab23a23bd8904ea52ef5141d8d0a}
|
||||
|
||||
|
||||
Simple constructor.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-max\-Num\-Gen}]the maximum number of generation. \end{description}
|
||||
\end{Desc}
|
||||
|
||||
|
||||
Definition at line 30 of file mo\-Gen\-Sol\-Continue.h.
|
||||
|
||||
\subsection{Member Function Documentation}
|
||||
\index{moGenSolContinue@{mo\-Gen\-Sol\-Continue}!operator()@{operator()}}
|
||||
\index{operator()@{operator()}!moGenSolContinue@{mo\-Gen\-Sol\-Continue}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class EOT$>$ bool {\bf mo\-Gen\-Sol\-Continue}$<$ EOT $>$::operator() (const EOT \& {\em \_\-\_\-sol})\hspace{0.3cm}{\tt [inline]}}\label{classmo_gen_sol_continue_457257cd73b474d6f7783d84d02c2e61}
|
||||
|
||||
|
||||
Function that activates the stop criterion.
|
||||
|
||||
Increments the counter and returns TRUE if the current number of iteration is lower than the given maximum number of iterations.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-sol}]the current solution. \end{description}
|
||||
\end{Desc}
|
||||
\begin{Desc}
|
||||
\item[Returns:]TRUE or FALSE according to the current generation number. \end{Desc}
|
||||
|
||||
|
||||
Definition at line 44 of file mo\-Gen\-Sol\-Continue.h.
|
||||
|
||||
References mo\-Gen\-Sol\-Continue$<$ EOT $>$::max\-Num\-Gen, and mo\-Gen\-Sol\-Continue$<$ EOT $>$::num\-Gen.\index{moGenSolContinue@{mo\-Gen\-Sol\-Continue}!init@{init}}
|
||||
\index{init@{init}!moGenSolContinue@{mo\-Gen\-Sol\-Continue}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class EOT$>$ void {\bf mo\-Gen\-Sol\-Continue}$<$ EOT $>$::init ()\hspace{0.3cm}{\tt [inline, virtual]}}\label{classmo_gen_sol_continue_6c5db8182157584b56507cc9075602d4}
|
||||
|
||||
|
||||
Procedure which allows to initialise the generation counter.
|
||||
|
||||
It can also be used to reset the iteration counter.
|
||||
|
||||
Implements {\bf mo\-Sol\-Continue$<$ EOT $>$} \doxyref{}{p.}{classmo_sol_continue_064dc966a210f4ffb9515be3f03ca4c7}.
|
||||
|
||||
Definition at line 54 of file mo\-Gen\-Sol\-Continue.h.
|
||||
|
||||
References mo\-Gen\-Sol\-Continue$<$ EOT $>$::num\-Gen.
|
||||
|
||||
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
||||
\item
|
||||
mo\-Gen\-Sol\-Continue.h\end{CompactItemize}
|
||||
197
trunk/paradiseo-mo/tutorial/docs/latex/classmo_h_c.eps
Normal file
197
trunk/paradiseo-mo/tutorial/docs/latex/classmo_h_c.eps
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: ClassName
|
||||
%%Creator: Doxygen
|
||||
%%CreationDate: Time
|
||||
%%For:
|
||||
%Magnification: 1.00
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 500 268.456
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%EndComments
|
||||
|
||||
% ----- variables -----
|
||||
|
||||
/boxwidth 0 def
|
||||
/boxheight 40 def
|
||||
/fontheight 24 def
|
||||
/marginwidth 10 def
|
||||
/distx 20 def
|
||||
/disty 40 def
|
||||
/boundaspect 1.8625 def % aspect ratio of the BoundingBox (width/height)
|
||||
/boundx 500 def
|
||||
/boundy boundx boundaspect div def
|
||||
/xspacing 0 def
|
||||
/yspacing 0 def
|
||||
/rows 2 def
|
||||
/cols 1 def
|
||||
/scalefactor 0 def
|
||||
/boxfont /Times-Roman findfont fontheight scalefont def
|
||||
|
||||
% ----- procedures -----
|
||||
|
||||
/dotted { [1 4] 0 setdash } def
|
||||
/dashed { [5] 0 setdash } def
|
||||
/solid { [] 0 setdash } def
|
||||
|
||||
/max % result = MAX(arg1,arg2)
|
||||
{
|
||||
/a exch def
|
||||
/b exch def
|
||||
a b gt {a} {b} ifelse
|
||||
} def
|
||||
|
||||
/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)
|
||||
{
|
||||
0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max
|
||||
} def
|
||||
|
||||
/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))
|
||||
{
|
||||
/str exch def
|
||||
/boxwidth boxwidth str stringwidth pop max def
|
||||
} def
|
||||
|
||||
/box % draws a box with text `arg1' at grid pos (arg2,arg3)
|
||||
{ gsave
|
||||
2 setlinewidth
|
||||
newpath
|
||||
exch xspacing mul xoffset add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
boxwidth 0 rlineto
|
||||
0 boxheight rlineto
|
||||
boxwidth neg 0 rlineto
|
||||
0 boxheight neg rlineto
|
||||
closepath
|
||||
dup stringwidth pop neg boxwidth add 2 div
|
||||
boxheight fontheight 2 div sub 2 div
|
||||
rmoveto show stroke
|
||||
grestore
|
||||
} def
|
||||
|
||||
/mark
|
||||
{ newpath
|
||||
exch xspacing mul xoffset add boxwidth add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
0 boxheight 4 div rlineto
|
||||
boxheight neg 4 div boxheight neg 4 div rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/arrow
|
||||
{ newpath
|
||||
moveto
|
||||
3 -8 rlineto
|
||||
-6 0 rlineto
|
||||
3 8 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/out % draws an output connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight add
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/in % draws an input connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul disty 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/hedge
|
||||
{
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
newpath
|
||||
x y moveto
|
||||
boxwidth 2 div distx add 0 rlineto
|
||||
stroke
|
||||
1 eq
|
||||
{ newpath x boxwidth 2 div distx add add y moveto
|
||||
-8 3 rlineto
|
||||
0 -6 rlineto
|
||||
8 3 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} if
|
||||
} def
|
||||
|
||||
/vedge
|
||||
{
|
||||
/ye exch def
|
||||
/ys exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add dup
|
||||
ys yspacing mul boxheight 2 div sub
|
||||
moveto
|
||||
ye yspacing mul boxheight 2 div sub
|
||||
lineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
/conn % connections the blocks from col `arg1' to `arg2' of row `arg3'
|
||||
{
|
||||
/ys exch def
|
||||
/xe exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add
|
||||
ys yspacing mul disty 2 div sub
|
||||
moveto
|
||||
xspacing xe xs sub mul 0
|
||||
rlineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
% ----- main ------
|
||||
|
||||
boxfont setfont
|
||||
1 boundaspect scale
|
||||
(moHC< M >) cw
|
||||
(moAlgo< M::EOType >) cw
|
||||
/boxwidth boxwidth marginwidth 2 mul add def
|
||||
/xspacing boxwidth distx add def
|
||||
/yspacing boxheight disty add def
|
||||
/scalefactor
|
||||
boxwidth cols mul distx cols 1 sub mul add
|
||||
boxheight rows mul disty rows 1 sub mul add boundaspect mul
|
||||
max def
|
||||
boundx scalefactor div boundy scalefactor div scale
|
||||
|
||||
% ----- classes -----
|
||||
|
||||
(moHC< M >) 0 0 box
|
||||
(moAlgo< M::EOType >) 0 1 box
|
||||
|
||||
% ----- relations -----
|
||||
|
||||
solid
|
||||
0 0 0 out
|
||||
solid
|
||||
1 0 1 in
|
||||
114
trunk/paradiseo-mo/tutorial/docs/latex/classmo_h_c.tex
Normal file
114
trunk/paradiseo-mo/tutorial/docs/latex/classmo_h_c.tex
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
\section{mo\-HC$<$ M $>$ Class Template Reference}
|
||||
\label{classmo_h_c}\index{moHC@{moHC}}
|
||||
Hill Climbing (HC).
|
||||
|
||||
|
||||
{\tt \#include $<$mo\-HC.h$>$}
|
||||
|
||||
Inheritance diagram for mo\-HC$<$ M $>$::\begin{figure}[H]
|
||||
\begin{center}
|
||||
\leavevmode
|
||||
\includegraphics[height=2cm]{classmo_h_c}
|
||||
\end{center}
|
||||
\end{figure}
|
||||
\subsection*{Public Member Functions}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
{\bf mo\-HC} ({\bf mo\-Move\-Init}$<$ M $>$ \&\_\-\_\-move\_\-init, {\bf mo\-Next\-Move}$<$ M $>$ \&\_\-\_\-next\_\-move, {\bf mo\-Move\-Incr\-Eval}$<$ M $>$ \&\_\-\_\-incr\_\-eval, {\bf mo\-Move\-Select}$<$ M $>$ \&\_\-\_\-move\_\-select, eo\-Eval\-Func$<$ {\bf EOT} $>$ \&\_\-\_\-full\_\-eval)
|
||||
\begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item
|
||||
{\bf mo\-HC} ({\bf mo\-Move\-Expl}$<$ M $>$ \&\_\-\_\-move\_\-expl, eo\-Eval\-Func$<$ {\bf EOT} $>$ \&\_\-\_\-full\_\-eval)
|
||||
\begin{CompactList}\small\item\em Light constructor. \item\end{CompactList}\item
|
||||
bool {\bf operator()} ({\bf EOT} \&\_\-\_\-sol)
|
||||
\begin{CompactList}\small\item\em Function which launches the HC. \item\end{CompactList}\end{CompactItemize}
|
||||
\subsection*{Private Types}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
typedef M::EOType {\bf EOT}\label{classmo_h_c_d219296ede03c679646bce2fe8ff96cb}
|
||||
|
||||
\begin{CompactList}\small\item\em Alias for the type. \item\end{CompactList}\item
|
||||
typedef EOT::Fitness {\bf Fitness}\label{classmo_h_c_56487c97a7cf0c423cc879d1bbd45027}
|
||||
|
||||
\begin{CompactList}\small\item\em Alias for the fitness. \item\end{CompactList}\end{CompactItemize}
|
||||
\subsection*{Private Attributes}
|
||||
\begin{CompactItemize}
|
||||
\item
|
||||
{\bf mo\-Move\-Expl}$<$ M $>$ \& {\bf move\_\-expl}\label{classmo_h_c_f6bfb4553fb699f1e08f7d9c37d06103}
|
||||
|
||||
\begin{CompactList}\small\item\em Complete exploration of the neighborhood. \item\end{CompactList}\item
|
||||
eo\-Eval\-Func$<$ {\bf EOT} $>$ \& {\bf full\_\-eval}\label{classmo_h_c_4b0d5cc70fc3d83f59a48b2bdea65736}
|
||||
|
||||
\begin{CompactList}\small\item\em A full evaluation function. \item\end{CompactList}\end{CompactItemize}
|
||||
|
||||
|
||||
\subsection{Detailed Description}
|
||||
\subsubsection*{template$<$class M$>$ class mo\-HC$<$ M $>$}
|
||||
|
||||
Hill Climbing (HC).
|
||||
|
||||
Class which describes the algorithm for a hill climbing.
|
||||
|
||||
|
||||
|
||||
Definition at line 26 of file mo\-HC.h.
|
||||
|
||||
\subsection{Constructor \& Destructor Documentation}
|
||||
\index{moHC@{mo\-HC}!moHC@{moHC}}
|
||||
\index{moHC@{moHC}!moHC@{mo\-HC}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ {\bf mo\-HC}$<$ M $>$::{\bf mo\-HC} ({\bf mo\-Move\-Init}$<$ M $>$ \& {\em \_\-\_\-move\_\-init}, {\bf mo\-Next\-Move}$<$ M $>$ \& {\em \_\-\_\-next\_\-move}, {\bf mo\-Move\-Incr\-Eval}$<$ M $>$ \& {\em \_\-\_\-incr\_\-eval}, {\bf mo\-Move\-Select}$<$ M $>$ \& {\em \_\-\_\-move\_\-select}, eo\-Eval\-Func$<$ {\bf EOT} $>$ \& {\em \_\-\_\-full\_\-eval})\hspace{0.3cm}{\tt [inline]}}\label{classmo_h_c_6cafe093f86a80c225827884cb9dc5b7}
|
||||
|
||||
|
||||
Full constructor.
|
||||
|
||||
All the boxes are given in order the HC to use a \doxyref{mo\-HCMove\-Loop\-Expl}{p.}{classmo_h_c_move_loop_expl}.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-move\_\-init}]a move initialiser. \item[{\em \_\-\_\-next\_\-move}]a neighborhood explorer. \item[{\em \_\-\_\-incr\_\-eval}]a (generally) efficient evaluation function. \item[{\em \_\-\_\-move\_\-select}]a move selector. \item[{\em \_\-\_\-full\_\-eval}]a full evaluation function. \end{description}
|
||||
\end{Desc}
|
||||
|
||||
|
||||
Definition at line 53 of file mo\-HC.h.\index{moHC@{mo\-HC}!moHC@{moHC}}
|
||||
\index{moHC@{moHC}!moHC@{mo\-HC}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ {\bf mo\-HC}$<$ M $>$::{\bf mo\-HC} ({\bf mo\-Move\-Expl}$<$ M $>$ \& {\em \_\-\_\-move\_\-expl}, eo\-Eval\-Func$<$ {\bf EOT} $>$ \& {\em \_\-\_\-full\_\-eval})\hspace{0.3cm}{\tt [inline]}}\label{classmo_h_c_45f27309792e584a27fa6dcb86ccda65}
|
||||
|
||||
|
||||
Light constructor.
|
||||
|
||||
This constructor allow to use another \doxyref{mo\-Move\-Expl}{p.}{classmo_move_expl} (generally not a \doxyref{mo\-HCMove\-Loop\-Expl}{p.}{classmo_h_c_move_loop_expl}).
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-move\_\-expl}]a complete explorer. \item[{\em \_\-\_\-full\_\-eval}]a full evaluation function. \end{description}
|
||||
\end{Desc}
|
||||
|
||||
|
||||
Definition at line 67 of file mo\-HC.h.
|
||||
|
||||
\subsection{Member Function Documentation}
|
||||
\index{moHC@{mo\-HC}!operator()@{operator()}}
|
||||
\index{operator()@{operator()}!moHC@{mo\-HC}}
|
||||
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class M$>$ bool {\bf mo\-HC}$<$ M $>$::operator() ({\bf EOT} \& {\em \_\-\_\-sol})\hspace{0.3cm}{\tt [inline]}}\label{classmo_h_c_ed4e273c420efa6386c5975a696a5010}
|
||||
|
||||
|
||||
Function which launches the HC.
|
||||
|
||||
The HC has to improve a current solution. As the \doxyref{mo\-SA}{p.}{classmo_s_a} and the mo TS, it can be used for HYBRIDATION in an evolutionnary algorithm.
|
||||
|
||||
\begin{Desc}
|
||||
\item[Parameters:]
|
||||
\begin{description}
|
||||
\item[{\em \_\-\_\-sol}]a current solution to improve. \end{description}
|
||||
\end{Desc}
|
||||
\begin{Desc}
|
||||
\item[Returns:]TRUE. \end{Desc}
|
||||
|
||||
|
||||
Definition at line 82 of file mo\-HC.h.
|
||||
|
||||
References mo\-HC$<$ M $>$::full\_\-eval, and mo\-HC$<$ M $>$::move\_\-expl.
|
||||
|
||||
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
||||
\item
|
||||
mo\-HC.h\end{CompactItemize}
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
%!PS-Adobe-2.0 EPSF-2.0
|
||||
%%Title: ClassName
|
||||
%%Creator: Doxygen
|
||||
%%CreationDate: Time
|
||||
%%For:
|
||||
%Magnification: 1.00
|
||||
%%Orientation: Portrait
|
||||
%%BoundingBox: 0 0 500 346.821
|
||||
%%Pages: 0
|
||||
%%BeginSetup
|
||||
%%EndSetup
|
||||
%%EndComments
|
||||
|
||||
% ----- variables -----
|
||||
|
||||
/boxwidth 0 def
|
||||
/boxheight 40 def
|
||||
/fontheight 24 def
|
||||
/marginwidth 10 def
|
||||
/distx 20 def
|
||||
/disty 40 def
|
||||
/boundaspect 1.44167 def % aspect ratio of the BoundingBox (width/height)
|
||||
/boundx 500 def
|
||||
/boundy boundx boundaspect div def
|
||||
/xspacing 0 def
|
||||
/yspacing 0 def
|
||||
/rows 3 def
|
||||
/cols 1 def
|
||||
/scalefactor 0 def
|
||||
/boxfont /Times-Roman findfont fontheight scalefont def
|
||||
|
||||
% ----- procedures -----
|
||||
|
||||
/dotted { [1 4] 0 setdash } def
|
||||
/dashed { [5] 0 setdash } def
|
||||
/solid { [] 0 setdash } def
|
||||
|
||||
/max % result = MAX(arg1,arg2)
|
||||
{
|
||||
/a exch def
|
||||
/b exch def
|
||||
a b gt {a} {b} ifelse
|
||||
} def
|
||||
|
||||
/xoffset % result = MAX(0,(scalefactor-(boxwidth*cols+distx*(cols-1)))/2)
|
||||
{
|
||||
0 scalefactor boxwidth cols mul distx cols 1 sub mul add sub 2 div max
|
||||
} def
|
||||
|
||||
/cw % boxwidth = MAX(boxwidth, stringwidth(arg1))
|
||||
{
|
||||
/str exch def
|
||||
/boxwidth boxwidth str stringwidth pop max def
|
||||
} def
|
||||
|
||||
/box % draws a box with text `arg1' at grid pos (arg2,arg3)
|
||||
{ gsave
|
||||
2 setlinewidth
|
||||
newpath
|
||||
exch xspacing mul xoffset add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
boxwidth 0 rlineto
|
||||
0 boxheight rlineto
|
||||
boxwidth neg 0 rlineto
|
||||
0 boxheight neg rlineto
|
||||
closepath
|
||||
dup stringwidth pop neg boxwidth add 2 div
|
||||
boxheight fontheight 2 div sub 2 div
|
||||
rmoveto show stroke
|
||||
grestore
|
||||
} def
|
||||
|
||||
/mark
|
||||
{ newpath
|
||||
exch xspacing mul xoffset add boxwidth add
|
||||
exch yspacing mul
|
||||
moveto
|
||||
0 boxheight 4 div rlineto
|
||||
boxheight neg 4 div boxheight neg 4 div rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/arrow
|
||||
{ newpath
|
||||
moveto
|
||||
3 -8 rlineto
|
||||
-6 0 rlineto
|
||||
3 8 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} def
|
||||
|
||||
/out % draws an output connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight add
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/in % draws an input connector for the block at (arg1,arg2)
|
||||
{
|
||||
newpath
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul disty 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
x y moveto
|
||||
0 disty 2 div rlineto
|
||||
stroke
|
||||
1 eq { x y disty 2 div add arrow } if
|
||||
} def
|
||||
|
||||
/hedge
|
||||
{
|
||||
exch xspacing mul xoffset add boxwidth 2 div add
|
||||
exch yspacing mul boxheight 2 div sub
|
||||
/y exch def
|
||||
/x exch def
|
||||
newpath
|
||||
x y moveto
|
||||
boxwidth 2 div distx add 0 rlineto
|
||||
stroke
|
||||
1 eq
|
||||
{ newpath x boxwidth 2 div distx add add y moveto
|
||||
-8 3 rlineto
|
||||
0 -6 rlineto
|
||||
8 3 rlineto
|
||||
closepath
|
||||
eofill
|
||||
stroke
|
||||
} if
|
||||
} def
|
||||
|
||||
/vedge
|
||||
{
|
||||
/ye exch def
|
||||
/ys exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add dup
|
||||
ys yspacing mul boxheight 2 div sub
|
||||
moveto
|
||||
ye yspacing mul boxheight 2 div sub
|
||||
lineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
/conn % connections the blocks from col `arg1' to `arg2' of row `arg3'
|
||||
{
|
||||
/ys exch def
|
||||
/xe exch def
|
||||
/xs exch def
|
||||
newpath
|
||||
xs xspacing mul xoffset add boxwidth 2 div add
|
||||
ys yspacing mul disty 2 div sub
|
||||
moveto
|
||||
xspacing xe xs sub mul 0
|
||||
rlineto
|
||||
stroke
|
||||
} def
|
||||
|
||||
% ----- main ------
|
||||
|
||||
boxfont setfont
|
||||
1 boundaspect scale
|
||||
(moHCMoveLoopExpl< M >) cw
|
||||
(moMoveLoopExpl< M >) cw
|
||||
(moMoveExpl< M >) cw
|
||||
/boxwidth boxwidth marginwidth 2 mul add def
|
||||
/xspacing boxwidth distx add def
|
||||
/yspacing boxheight disty add def
|
||||
/scalefactor
|
||||
boxwidth cols mul distx cols 1 sub mul add
|
||||
boxheight rows mul disty rows 1 sub mul add boundaspect mul
|
||||
max def
|
||||
boundx scalefactor div boundy scalefactor div scale
|
||||
|
||||
% ----- classes -----
|
||||
|
||||
(moHCMoveLoopExpl< M >) 0 0 box
|
||||
(moMoveLoopExpl< M >) 0 1 box
|
||||
(moMoveExpl< M >) 0 2 box
|
||||
|
||||
% ----- relations -----
|
||||
|
||||
solid
|
||||
0 0 0 out
|
||||
solid
|
||||
1 0 1 in
|
||||
solid
|
||||
0 0 1 out
|
||||
solid
|
||||
1 0 2 in
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue