105 lines
9.3 KiB
TeX
105 lines
9.3 KiB
TeX
\hypertarget{classeo_scalar_fitness}{}\doxysection{eo\+Scalar\+Fitness$<$ Scalar\+Type, Compare $>$ Class Template Reference}
|
|
\label{classeo_scalar_fitness}\index{eoScalarFitness$<$ ScalarType, Compare $>$@{eoScalarFitness$<$ ScalarType, Compare $>$}}
|
|
|
|
|
|
{\ttfamily \#include $<$eo\+Scalar\+Fitness.\+h$>$}
|
|
|
|
\doxysubsection*{Public Types}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_afc76b5bd4f27f9c3694d7d3553ff113e}\label{classeo_scalar_fitness_afc76b5bd4f27f9c3694d7d3553ff113e}}
|
|
using {\bfseries Scalar\+Type} = S\+C\+A\+L\+AR
|
|
\end{DoxyCompactItemize}
|
|
\doxysubsection*{Public Member Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_af6021c869e4b9fb76b5343132e3f2c8f}\label{classeo_scalar_fitness_af6021c869e4b9fb76b5343132e3f2c8f}}
|
|
{\bfseries eo\+Scalar\+Fitness} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \&other)
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a4ec4d7443280341dd60424eff40db5c5}\label{classeo_scalar_fitness_a4ec4d7443280341dd60424eff40db5c5}}
|
|
{\bfseries eo\+Scalar\+Fitness} (const Scalar\+Type \&v)
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_aaff832bc4690092965a17ee9556f1b9a}\label{classeo_scalar_fitness_aaff832bc4690092965a17ee9556f1b9a}}
|
|
\mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \& {\bfseries operator=} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \&other)
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a7721fa980ddf22b926e1a60d6dd99e6b}\label{classeo_scalar_fitness_a7721fa980ddf22b926e1a60d6dd99e6b}}
|
|
\mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \& {\bfseries operator=} (const Scalar\+Type \&v)
|
|
\item
|
|
\mbox{\hyperlink{classeo_scalar_fitness_a29462d1ea710197bda92e41455314f6d}{operator Scalar\+Type}} (void) const
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_ac38f3a5d24107c04e0d7bcc4e9524916}\label{classeo_scalar_fitness_ac38f3a5d24107c04e0d7bcc4e9524916}}
|
|
bool \mbox{\hyperlink{classeo_scalar_fitness_ac38f3a5d24107c04e0d7bcc4e9524916}{operator$<$}} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \&other) const
|
|
\begin{DoxyCompactList}\small\item\em Comparison, using less by default. \end{DoxyCompactList}\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a7e49eac6ce3714b66f1257a180bb3bda}\label{classeo_scalar_fitness_a7e49eac6ce3714b66f1257a180bb3bda}}
|
|
bool \mbox{\hyperlink{classeo_scalar_fitness_a7e49eac6ce3714b66f1257a180bb3bda}{operator$<$}} (const Scalar\+Type \&other) const
|
|
\begin{DoxyCompactList}\small\item\em Comparison, using less by default. \end{DoxyCompactList}\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a18343bea27cd21166ffb09c1afff1cc6}\label{classeo_scalar_fitness_a18343bea27cd21166ffb09c1afff1cc6}}
|
|
bool {\bfseries operator$>$} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$ Scalar\+Type, Compare $>$ \&y) const
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a39c687254a2228ecf913365d87afa430}\label{classeo_scalar_fitness_a39c687254a2228ecf913365d87afa430}}
|
|
bool {\bfseries operator$<$=} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$ Scalar\+Type, Compare $>$ \&y) const
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a0e5e602906a4c8f3f43d36a4f2708616}\label{classeo_scalar_fitness_a0e5e602906a4c8f3f43d36a4f2708616}}
|
|
bool {\bfseries operator$>$=} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$ Scalar\+Type, Compare $>$ \&y) const
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_af6021c869e4b9fb76b5343132e3f2c8f}\label{classeo_scalar_fitness_af6021c869e4b9fb76b5343132e3f2c8f}}
|
|
{\bfseries eo\+Scalar\+Fitness} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \&other)
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a7f53d671a645556b8a4bf762ade11e0d}\label{classeo_scalar_fitness_a7f53d671a645556b8a4bf762ade11e0d}}
|
|
{\bfseries eo\+Scalar\+Fitness} (const S\+C\+A\+L\+AR \&v)
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_aaff832bc4690092965a17ee9556f1b9a}\label{classeo_scalar_fitness_aaff832bc4690092965a17ee9556f1b9a}}
|
|
\mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \& {\bfseries operator=} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \&other)
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a939bbbe450a56911da629101b320a923}\label{classeo_scalar_fitness_a939bbbe450a56911da629101b320a923}}
|
|
\mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \& {\bfseries operator=} (const S\+C\+A\+L\+AR \&v)
|
|
\item
|
|
\mbox{\hyperlink{classeo_scalar_fitness_a95a14e3bbfcf56a4dce618bb43cecbcc}{operator S\+C\+A\+L\+AR}} (void) const
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_ac38f3a5d24107c04e0d7bcc4e9524916}\label{classeo_scalar_fitness_ac38f3a5d24107c04e0d7bcc4e9524916}}
|
|
bool \mbox{\hyperlink{classeo_scalar_fitness_ac38f3a5d24107c04e0d7bcc4e9524916}{operator$<$}} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}} \&other) const
|
|
\begin{DoxyCompactList}\small\item\em Comparison, using less by default. \end{DoxyCompactList}\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a839316f418ceeae49f06bc5aacadec04}\label{classeo_scalar_fitness_a839316f418ceeae49f06bc5aacadec04}}
|
|
bool \mbox{\hyperlink{classeo_scalar_fitness_a839316f418ceeae49f06bc5aacadec04}{operator$<$}} (const S\+C\+A\+L\+AR \&other) const
|
|
\begin{DoxyCompactList}\small\item\em Comparison, using less by default. \end{DoxyCompactList}\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_acef98dbf70d49f152f4bdfc455f67913}\label{classeo_scalar_fitness_acef98dbf70d49f152f4bdfc455f67913}}
|
|
bool {\bfseries operator$>$} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$ S\+C\+A\+L\+AR, C\+MP $>$ \&y) const
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_ad15af2de8d9dcf0511545c572e6db663}\label{classeo_scalar_fitness_ad15af2de8d9dcf0511545c572e6db663}}
|
|
bool {\bfseries operator$<$=} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$ S\+C\+A\+L\+AR, C\+MP $>$ \&y) const
|
|
\item
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a4313c20272a46a97257cb4301d4c2f00}\label{classeo_scalar_fitness_a4313c20272a46a97257cb4301d4c2f00}}
|
|
bool {\bfseries operator$>$=} (const \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$ S\+C\+A\+L\+AR, C\+MP $>$ \&y) const
|
|
\end{DoxyCompactItemize}
|
|
|
|
|
|
\doxysubsection{Detailed Description}
|
|
\subsubsection*{template$<$class Scalar\+Type, class Compare$>$\newline
|
|
class eo\+Scalar\+Fitness$<$ Scalar\+Type, Compare $>$}
|
|
|
|
Wraps a scalar fitness values such as a double or int, with the option of maximizing (using less$<$\+Scalar\+Type$>$) or minimizing (using greater$<$\+Scalar\+Type$>$)
|
|
|
|
It overrides \mbox{\hyperlink{classeo_scalar_fitness_ac38f3a5d24107c04e0d7bcc4e9524916}{operator$<$()}} to use the Compare template argument.~Thus, if you need to compare if an indiv1 is \char`\"{}better\char`\"{} than an indiv2, you can use\+: if( indiv1 $>$ indiv2 ) \{ // indiv1 is better \} else \{ // indiv2 is better \}
|
|
|
|
Suitable constructors and assignments and casts are defined to work with this quantity as if it were a Scalar\+Type.
|
|
|
|
\doxysubsection{Member Function Documentation}
|
|
\mbox{\Hypertarget{classeo_scalar_fitness_a95a14e3bbfcf56a4dce618bb43cecbcc}\label{classeo_scalar_fitness_a95a14e3bbfcf56a4dce618bb43cecbcc}}
|
|
\index{eoScalarFitness$<$ ScalarType, Compare $>$@{eoScalarFitness$<$ ScalarType, Compare $>$}!operator SCALAR@{operator SCALAR}}
|
|
\index{operator SCALAR@{operator SCALAR}!eoScalarFitness$<$ ScalarType, Compare $>$@{eoScalarFitness$<$ ScalarType, Compare $>$}}
|
|
\doxysubsubsection{\texorpdfstring{operator SCALAR()}{operator SCALAR()}}
|
|
{\footnotesize\ttfamily template$<$class Scalar\+Type , class Compare $>$ \\
|
|
\mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$ Scalar\+Type, Compare $>$\+::operator S\+C\+A\+L\+AR (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}
|
|
|
|
Conversion operator\+: it permits to use a fitness instance as its scalar type, if needed.~For example, this is possible\+: \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$double,std\+::less$<$double$>$ $>$ fit; double val = 1.\+0; fit = val; val = fit; \mbox{\Hypertarget{classeo_scalar_fitness_a29462d1ea710197bda92e41455314f6d}\label{classeo_scalar_fitness_a29462d1ea710197bda92e41455314f6d}}
|
|
\index{eoScalarFitness$<$ ScalarType, Compare $>$@{eoScalarFitness$<$ ScalarType, Compare $>$}!operator ScalarType@{operator ScalarType}}
|
|
\index{operator ScalarType@{operator ScalarType}!eoScalarFitness$<$ ScalarType, Compare $>$@{eoScalarFitness$<$ ScalarType, Compare $>$}}
|
|
\doxysubsubsection{\texorpdfstring{operator ScalarType()}{operator ScalarType()}}
|
|
{\footnotesize\ttfamily template$<$class Scalar\+Type , class Compare $>$ \\
|
|
\mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$ Scalar\+Type, Compare $>$\+::operator Scalar\+Type (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}
|
|
|
|
Conversion operator\+: it permits to use a fitness instance as its scalar type, if needed.~For example, this is possible\+: \mbox{\hyperlink{classeo_scalar_fitness}{eo\+Scalar\+Fitness}}$<$double,std\+::less$<$double$>$ $>$ fit; double val = 1.\+0; fit = val; val = fit;
|
|
|
|
The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
|
|
\item
|
|
deprecated/eo/src/eo\+Scalar\+Fitness.\+h\end{DoxyCompactItemize}
|