New modifications for peo module (pack&unpack methods can use now different kind of individual fitness)

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@2471 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
khouadjia 2011-10-11 16:27:48 +00:00
commit 99fc80206c

View file

@ -4,7 +4,9 @@
* (C) OPAC Team, LIFL, 2002-2008 * (C) OPAC Team, LIFL, 2002-2008
* *
* Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape * Sebastien Cahon, Alexandru-Adrian Tantar, Clive Canape
* * Mostepha-Redouane Khouadjia, Johann Dréo
* (C) TAO Project Team of INRIA Saclay, Thales group, 2010
* This software is governed by the CeCILL license under French law and * This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use, * abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL * modify and/ or redistribute the software under the terms of the CeCILL
@ -46,12 +48,15 @@
#include "core/peo_debug.h" #include "core/peo_debug.h"
#include "peoAggEvalFunc.h" #include "peoAggEvalFunc.h"
#include "peoNoAggEvalFunc.h" #include "peoNoAggEvalFunc.h"
#include "core/packUnpackeoScalarFitness.h"
//! @class peoPopEval //! @class peoPopEval
//! @brief Parallel evaluation functor wrapper //! @brief Parallel evaluation functor wrapper
//! @see Service eoPopEvalFunc //! @see Service eoPopEvalFunc
//! @version 1.2 //! @version 1.2
//! @date 2006 //! @date 2006
template< class EOT > class peoPopEval : public Service, public eoPopEvalFunc<EOT> template< class EOT > class peoPopEval : public Service, public eoPopEvalFunc<EOT>
{ {
@ -218,11 +223,13 @@ template< class EOT > void peoPopEval< EOT > :: packResult()
template< class EOT > void peoPopEval< EOT > :: unpackResult() template< class EOT > void peoPopEval< EOT > :: unpackResult()
{ {
typename EOT :: Fitness fit; typename EOT :: Fitness fit, __fit;
/* Built in types : int, short, long int, long long int, /* Built in types : int, short, long int, long long int,
* unsigned int, unsigend short, unsigned long int, unsigned long long int, * unsigned int, unsigend short, unsigned long int, unsigned long long int,
* float, double, long double * float, double, long double
*/ */
unpack(__fit); fit = __fit;
/*
char types [11] = {'i','s','l','x','j','t','m','y', 'f', 'd','e'}; char types [11] = {'i','s','l','x','j','t','m','y', 'f', 'd','e'};
const char* type = typeid(fit).name(); const char* type = typeid(fit).name();
int length = strlen(type); int length = strlen(type);
@ -268,7 +275,7 @@ template< class EOT > void peoPopEval< EOT > :: unpackResult()
} }
} }
*/
/* Unpacking the @ of the associated individual */ /* Unpacking the @ of the associated individual */
unpack( ad_sol ); unpack( ad_sol );