git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@558 331e1502-861f-0410-8da2-ba01fb791d7f
226 lines
14 KiB
TeX
226 lines
14 KiB
TeX
\section{MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$ Class Template Reference}
|
|
\label{classMOEO}\index{MOEO@{MOEO}}
|
|
Base class allowing to represent a solution (an individual) for multi-objective optimization.
|
|
|
|
|
|
{\tt \#include $<$MOEO.h$>$}
|
|
|
|
Inheritance diagram for MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::\begin{figure}[H]
|
|
\begin{center}
|
|
\leavevmode
|
|
\includegraphics[height=2.25806cm]{classMOEO}
|
|
\end{center}
|
|
\end{figure}
|
|
\subsection*{Public Types}
|
|
\begin{CompactItemize}
|
|
\item
|
|
typedef MOEOObjective\-Vector \bf{Objective\-Vector}\label{classMOEO_9fafca99234ef3cd9fdbaf05bde5a275}
|
|
|
|
\begin{CompactList}\small\item\em the objective vector type of a solution \item\end{CompactList}\item
|
|
typedef MOEOFitness \bf{Fitness}\label{classMOEO_03184b6c0b5c905e0ff5a790a3d55803}
|
|
|
|
\begin{CompactList}\small\item\em the fitness type of a solution \item\end{CompactList}\item
|
|
typedef MOEODiversity \bf{Diversity}\label{classMOEO_9682a883fedc6333e95906e02236d492}
|
|
|
|
\begin{CompactList}\small\item\em the diversity type of a solution \item\end{CompactList}\end{CompactItemize}
|
|
\subsection*{Public Member Functions}
|
|
\begin{CompactItemize}
|
|
\item
|
|
\bf{MOEO} ()\label{classMOEO_cff537a68ecc80c753318d3e12f842f5}
|
|
|
|
\begin{CompactList}\small\item\em Ctor. \item\end{CompactList}\item
|
|
virtual \bf{$\sim$MOEO} ()\label{classMOEO_0215e9acab4ab57088175f9856e6c48c}
|
|
|
|
\begin{CompactList}\small\item\em Virtual dtor. \item\end{CompactList}\item
|
|
\bf{Objective\-Vector} \bf{objective\-Vector} () const \label{classMOEO_7509143b0f18644e7d3183a039cece7b}
|
|
|
|
\begin{CompactList}\small\item\em Returns the objective vector of the current solution. \item\end{CompactList}\item
|
|
void \bf{objective\-Vector} (const \bf{Objective\-Vector} \&\_\-objective\-Vector\-Value)
|
|
\begin{CompactList}\small\item\em Sets the objective vector of the current solution. \item\end{CompactList}\item
|
|
void \bf{invalidate\-Objective\-Vector} ()\label{classMOEO_6b75e7e84726cf4e2d50216a35cec70b}
|
|
|
|
\begin{CompactList}\small\item\em Sets the objective vector as invalid. \item\end{CompactList}\item
|
|
bool \bf{invalid\-Objective\-Vector} () const \label{classMOEO_c8e93beabdab8c2f79f17c7e39efdd05}
|
|
|
|
\begin{CompactList}\small\item\em Returns true if the objective vector is invalid, false otherwise. \item\end{CompactList}\item
|
|
\bf{Fitness} \bf{fitness} () const \label{classMOEO_c02c16902f914a6fde83a33d2c8b1534}
|
|
|
|
\begin{CompactList}\small\item\em Returns the fitness value of the current solution. \item\end{CompactList}\item
|
|
void \bf{fitness} (const \bf{Fitness} \&\_\-fitness\-Value)
|
|
\begin{CompactList}\small\item\em Sets the fitness value of the current solution. \item\end{CompactList}\item
|
|
void \bf{invalidate\-Fitness} ()\label{classMOEO_55876e2e7cd537052fec1c7f46f37ffe}
|
|
|
|
\begin{CompactList}\small\item\em Sets the fitness value as invalid. \item\end{CompactList}\item
|
|
bool \bf{invalid\-Fitness} () const \label{classMOEO_9423f9daebb1f7be6d52c80692e4af48}
|
|
|
|
\begin{CompactList}\small\item\em Returns true if the fitness value is invalid, false otherwise. \item\end{CompactList}\item
|
|
\bf{Diversity} \bf{diversity} () const \label{classMOEO_c610f4636e8c26a351fcfbc25028aa01}
|
|
|
|
\begin{CompactList}\small\item\em Returns the diversity value of the current solution. \item\end{CompactList}\item
|
|
void \bf{diversity} (const \bf{Diversity} \&\_\-diversity\-Value)
|
|
\begin{CompactList}\small\item\em Sets the diversity value of the current solution. \item\end{CompactList}\item
|
|
void \bf{invalidate\-Diversity} ()\label{classMOEO_1283a27baab9728673445832e6d4301a}
|
|
|
|
\begin{CompactList}\small\item\em Sets the diversity value as invalid. \item\end{CompactList}\item
|
|
bool \bf{invalid\-Diversity} () const \label{classMOEO_c4941e8e600fd360fdf1b061ee938e34}
|
|
|
|
\begin{CompactList}\small\item\em Returns true if the diversity value is invalid, false otherwise. \item\end{CompactList}\item
|
|
void \bf{invalidate} ()\label{classMOEO_1069501a40e07071d78c067c46b696ee}
|
|
|
|
\begin{CompactList}\small\item\em Sets the objective vector, the fitness value and the diversity value as invalid. \item\end{CompactList}\item
|
|
bool \bf{invalid} () const \label{classMOEO_314df446d1a9211121cedb2629da8906}
|
|
|
|
\begin{CompactList}\small\item\em Returns true if the fitness value is invalid, false otherwise. \item\end{CompactList}\item
|
|
bool \bf{operator$<$} (const \bf{MOEO} \&\_\-other) const
|
|
\begin{CompactList}\small\item\em Returns true if the objective vector of the current solution is smaller than the objective vector of \_\-other on the first objective, then on the second, and so on (can be usefull for sorting/printing). \item\end{CompactList}\item
|
|
virtual std::string \bf{class\-Name} () const \label{classMOEO_ca43305b2f4d1b1933f7e1c579404379}
|
|
|
|
\begin{CompactList}\small\item\em Return the class id (the class name as a std::string). \item\end{CompactList}\item
|
|
virtual void \bf{print\-On} (std::ostream \&\_\-os) const
|
|
\begin{CompactList}\small\item\em Writing object. \item\end{CompactList}\item
|
|
virtual void \bf{read\-From} (std::istream \&\_\-is)
|
|
\begin{CompactList}\small\item\em Reading object. \item\end{CompactList}\end{CompactItemize}
|
|
\subsection*{Private Attributes}
|
|
\begin{CompactItemize}
|
|
\item
|
|
\bf{Objective\-Vector} \bf{objective\-Vector\-Value}\label{classMOEO_26b6fd1187b825b655d5a34b1d0693c9}
|
|
|
|
\begin{CompactList}\small\item\em the objective vector of this solution \item\end{CompactList}\item
|
|
bool \bf{invalid\-Objective\-Vector\-Value}\label{classMOEO_d07613f286ef484f164c51c9c1b2dc91}
|
|
|
|
\begin{CompactList}\small\item\em true if the objective vector is invalid \item\end{CompactList}\item
|
|
\bf{Fitness} \bf{fitness\-Value}\label{classMOEO_bcc3104ab7311fa5987de80811393c7c}
|
|
|
|
\begin{CompactList}\small\item\em the fitness value of this solution \item\end{CompactList}\item
|
|
bool \bf{invalid\-Fitness\-Value}\label{classMOEO_17f57546c6de38604d6749cc6ef9d254}
|
|
|
|
\begin{CompactList}\small\item\em true if the fitness value is invalid \item\end{CompactList}\item
|
|
\bf{Diversity} \bf{diversity\-Value}\label{classMOEO_83cc0d3a4020cbd7e1ff895dfedc61eb}
|
|
|
|
\begin{CompactList}\small\item\em the diversity value of this solution \item\end{CompactList}\item
|
|
bool \bf{invalid\-Diversity\-Value}\label{classMOEO_c53c08b7c51d4cc06efe58c6127f9b7d}
|
|
|
|
\begin{CompactList}\small\item\em true if the diversity value is invalid \item\end{CompactList}\end{CompactItemize}
|
|
|
|
|
|
\subsection{Detailed Description}
|
|
\subsubsection*{template$<$class MOEOObjective\-Vector, class MOEOFitness, class MOEODiversity$>$ class MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$}
|
|
|
|
Base class allowing to represent a solution (an individual) for multi-objective optimization.
|
|
|
|
The template argument MOEOObjective\-Vector allows to represent the solution in the objective space (it can be a \doxyref{moeo\-Objective\-Vector}{p.}{classmoeoObjectiveVector} object). The template argument MOEOFitness is an object reflecting the quality of the solution in term of convergence (the fitness of a solution is always to be maximized). The template argument MOEODiversity is an object reflecting the quality of the solution in term of diversity (the diversity of a solution is always to be maximized). All template arguments must have a void and a copy constructor. Using some specific representations, you will have to define a copy constructor if the default one is not what you want. In the same cases, you will also have to define the affectation operator (operator=). Then, you will explicitly have to call the parent copy constructor and the parent affectation operator at the beginning of the corresponding implementation. Besides, note that, contrary to the mono-objective case (and to \doxyref{EO}) where the fitness value of a solution is confused with its objective value, the fitness value differs of the objectives values in the multi-objective case.
|
|
|
|
|
|
|
|
Definition at line 34 of file MOEO.h.
|
|
|
|
\subsection{Member Function Documentation}
|
|
\index{MOEO@{MOEO}!objectiveVector@{objectiveVector}}
|
|
\index{objectiveVector@{objectiveVector}!MOEO@{MOEO}}
|
|
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class MOEOObjective\-Vector, class MOEOFitness, class MOEODiversity$>$ void \bf{MOEO}$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::objective\-Vector (const \bf{Objective\-Vector} \& {\em \_\-objective\-Vector\-Value})\hspace{0.3cm}{\tt [inline]}}\label{classMOEO_d4a765a76f9acc1bca36297ab55d7282}
|
|
|
|
|
|
Sets the objective vector of the current solution.
|
|
|
|
\begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em \_\-objective\-Vector\-Value}]the new objective vector \end{description}
|
|
\end{Desc}
|
|
|
|
|
|
Definition at line 85 of file MOEO.h.
|
|
|
|
References MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::invalid\-Objective\-Vector\-Value, and MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::objective\-Vector\-Value.\index{MOEO@{MOEO}!fitness@{fitness}}
|
|
\index{fitness@{fitness}!MOEO@{MOEO}}
|
|
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class MOEOObjective\-Vector, class MOEOFitness, class MOEODiversity$>$ void \bf{MOEO}$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::fitness (const \bf{Fitness} \& {\em \_\-fitness\-Value})\hspace{0.3cm}{\tt [inline]}}\label{classMOEO_4dc05ded73bb60d1a51e282006c8942d}
|
|
|
|
|
|
Sets the fitness value of the current solution.
|
|
|
|
\begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em \_\-fitness\-Value}]the new fitness value \end{description}
|
|
\end{Desc}
|
|
|
|
|
|
Definition at line 127 of file MOEO.h.
|
|
|
|
References MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::fitness\-Value, and MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::invalid\-Fitness\-Value.\index{MOEO@{MOEO}!diversity@{diversity}}
|
|
\index{diversity@{diversity}!MOEO@{MOEO}}
|
|
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class MOEOObjective\-Vector, class MOEOFitness, class MOEODiversity$>$ void \bf{MOEO}$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::diversity (const \bf{Diversity} \& {\em \_\-diversity\-Value})\hspace{0.3cm}{\tt [inline]}}\label{classMOEO_1f0a391984cd14bcf930d1d81dd4848e}
|
|
|
|
|
|
Sets the diversity value of the current solution.
|
|
|
|
\begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em \_\-diversity\-Value}]the new diversity value \end{description}
|
|
\end{Desc}
|
|
|
|
|
|
Definition at line 169 of file MOEO.h.
|
|
|
|
References MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::diversity\-Value, and MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::invalid\-Diversity\-Value.\index{MOEO@{MOEO}!operator<@{operator$<$}}
|
|
\index{operator<@{operator$<$}!MOEO@{MOEO}}
|
|
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class MOEOObjective\-Vector, class MOEOFitness, class MOEODiversity$>$ bool \bf{MOEO}$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::operator$<$ (const \bf{MOEO}$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$ \& {\em \_\-other}) const\hspace{0.3cm}{\tt [inline]}}\label{classMOEO_119ef916de4955298febaf3e1c8ad705}
|
|
|
|
|
|
Returns true if the objective vector of the current solution is smaller than the objective vector of \_\-other on the first objective, then on the second, and so on (can be usefull for sorting/printing).
|
|
|
|
You should implement another function in the sub-class of \doxyref{MOEO}{p.}{classMOEO} to have another sorting mecanism. \begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em \_\-other}]the other \doxyref{MOEO}{p.}{classMOEO} object to compare with \end{description}
|
|
\end{Desc}
|
|
|
|
|
|
Definition at line 220 of file MOEO.h.
|
|
|
|
References MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::objective\-Vector().\index{MOEO@{MOEO}!printOn@{printOn}}
|
|
\index{printOn@{printOn}!MOEO@{MOEO}}
|
|
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class MOEOObjective\-Vector, class MOEOFitness, class MOEODiversity$>$ virtual void \bf{MOEO}$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::print\-On (std::ostream \& {\em \_\-os}) const\hspace{0.3cm}{\tt [inline, virtual]}}\label{classMOEO_a3b6074b3289585bf4dc6998e8397e24}
|
|
|
|
|
|
Writing object.
|
|
|
|
\begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em \_\-os}]output stream \end{description}
|
|
\end{Desc}
|
|
|
|
|
|
Reimplemented from \bf{EO$<$ MOEOObjective\-Vector $>$}.
|
|
|
|
Reimplemented in \bf{moeo\-Bit\-Vector$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$} \doxyref{p.}{classmoeoBitVector_78f821c548cf46d8bcd30aa8a52ffb7c}, \bf{moeo\-Vector$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity, Gene\-Type $>$} \doxyref{p.}{classmoeoVector_d0a92cb26483ffab754ac4a0efb76308}, \bf{moeo\-Vector$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity, bool $>$} \doxyref{p.}{classmoeoVector_d0a92cb26483ffab754ac4a0efb76308}, and \bf{moeo\-Vector$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity, double $>$} \doxyref{p.}{classmoeoVector_d0a92cb26483ffab754ac4a0efb76308}.
|
|
|
|
Definition at line 239 of file MOEO.h.
|
|
|
|
References MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::invalid\-Objective\-Vector(), and MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::objective\-Vector\-Value.\index{MOEO@{MOEO}!readFrom@{readFrom}}
|
|
\index{readFrom@{readFrom}!MOEO@{MOEO}}
|
|
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}template$<$class MOEOObjective\-Vector, class MOEOFitness, class MOEODiversity$>$ virtual void \bf{MOEO}$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::read\-From (std::istream \& {\em \_\-is})\hspace{0.3cm}{\tt [inline, virtual]}}\label{classMOEO_1bbd9cb1a7709592bf4bc29dff8c5273}
|
|
|
|
|
|
Reading object.
|
|
|
|
\begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em \_\-is}]input stream \end{description}
|
|
\end{Desc}
|
|
|
|
|
|
Reimplemented from \bf{EO$<$ MOEOObjective\-Vector $>$}.
|
|
|
|
Reimplemented in \bf{moeo\-Bit\-Vector$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$} \doxyref{p.}{classmoeoBitVector_31cd3f894615d0a27dd116a5c8082521}, \bf{moeo\-Vector$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity, Gene\-Type $>$} \doxyref{p.}{classmoeoVector_cd8ee0fe79bb9515b29e2a4d3fee5ab9}, \bf{moeo\-Vector$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity, bool $>$} \doxyref{p.}{classmoeoVector_cd8ee0fe79bb9515b29e2a4d3fee5ab9}, and \bf{moeo\-Vector$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity, double $>$} \doxyref{p.}{classmoeoVector_cd8ee0fe79bb9515b29e2a4d3fee5ab9}.
|
|
|
|
Definition at line 256 of file MOEO.h.
|
|
|
|
References MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::invalidate\-Objective\-Vector(), MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::invalid\-Objective\-Vector\-Value, and MOEO$<$ MOEOObjective\-Vector, MOEOFitness, MOEODiversity $>$::objective\-Vector\-Value.
|
|
|
|
The documentation for this class was generated from the following file:\begin{CompactItemize}
|
|
\item
|
|
MOEO.h\end{CompactItemize}
|