Update type of elements in QAP eval and QAP incrEval
This commit is contained in:
parent
dbb8fbe9a7
commit
c9475c4ed0
6 changed files with 79 additions and 32 deletions
|
|
@ -53,7 +53,7 @@ public:
|
|||
* Constructor
|
||||
* @param _param the parameter of type double to save in the vector
|
||||
*/
|
||||
moVectorMonitor(eoValueParam<double> & _param) : doubleParam(&_param), intParam(NULL), intLongParam(NULL), eotParam(NULL)
|
||||
moVectorMonitor(eoValueParam<double> & _param) : doubleParam(&_param), intParam(NULL), intLongParam(NULL), intLongLongParam(NULL), eotParam(NULL)
|
||||
{
|
||||
// precision of the output by default
|
||||
precisionOutput = std::cout.precision();
|
||||
|
|
@ -63,7 +63,7 @@ public:
|
|||
* Default Constructor
|
||||
* @param _param the parameter of type unsigned int to save in the vector
|
||||
*/
|
||||
moVectorMonitor(eoValueParam<unsigned int> & _param) : doubleParam(NULL), intParam(&_param), intLongParam(NULL), eotParam(NULL)
|
||||
moVectorMonitor(eoValueParam<unsigned int> & _param) : doubleParam(NULL), intParam(&_param), intLongParam(NULL), intLongLongParam(NULL), eotParam(NULL)
|
||||
{
|
||||
// precision of the output by default
|
||||
precisionOutput = std::cout.precision();
|
||||
|
|
@ -73,7 +73,17 @@ public:
|
|||
* Default Constructor
|
||||
* @param _param the parameter of type unsigned int to save in the vector
|
||||
*/
|
||||
moVectorMonitor(eoValueParam<unsigned long> & _param) : doubleParam(NULL), intParam(NULL), intLongParam(&_param), eotParam(NULL)
|
||||
moVectorMonitor(eoValueParam<unsigned long> & _param) : doubleParam(NULL), intParam(NULL), intLongParam(&_param), intLongLongParam(NULL), eotParam(NULL)
|
||||
{
|
||||
// precision of the output by default
|
||||
precisionOutput = std::cout.precision();
|
||||
}
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param _param the parameter of type unsigned int to save in the vector
|
||||
*/
|
||||
moVectorMonitor(eoValueParam<long long int> & _param) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), intLongLongParam(&_param), eotParam(NULL)
|
||||
{
|
||||
// precision of the output by default
|
||||
precisionOutput = std::cout.precision();
|
||||
|
|
@ -83,7 +93,18 @@ public:
|
|||
* Default Constructor
|
||||
* @param _param the parameter of type EOT to save in the vector
|
||||
*/
|
||||
moVectorMonitor(eoValueParam<EOT> & _param) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), eotParam(&_param)
|
||||
moVectorMonitor(eoValueParam<EOT> & _param) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), intLongLongParam(NULL), eotParam(&_param)
|
||||
{
|
||||
// precision of the output by default
|
||||
precisionOutput = std::cout.precision();
|
||||
}
|
||||
|
||||
/**
|
||||
* Default Constructor
|
||||
* @param _param the parameter of type eoScalarFitness to save in the vector
|
||||
*/
|
||||
template <class Compare>
|
||||
moVectorMonitor(eoValueParam<eoScalarFitness<long long int, Compare> > & _param) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), intLongLongParam(& (eoValueParam<long long int>&)_param), eotParam(NULL)
|
||||
{
|
||||
// precision of the output by default
|
||||
precisionOutput = std::cout.precision();
|
||||
|
|
@ -94,7 +115,7 @@ public:
|
|||
* @param _param the parameter of type eoScalarFitness to save in the vector
|
||||
*/
|
||||
template <class ScalarType, class Compare>
|
||||
moVectorMonitor(eoValueParam<eoScalarFitness<ScalarType, Compare> > & _param) : doubleParam( & (eoValueParam<double>&)_param), intParam(NULL), intLongParam(NULL), eotParam(NULL)
|
||||
moVectorMonitor(eoValueParam<eoScalarFitness<ScalarType, Compare> > & _param) : doubleParam( & (eoValueParam<double>&)_param), intParam(NULL), intLongParam(NULL), intLongLongParam(NULL), eotParam(NULL)
|
||||
{
|
||||
// precision of the output by default
|
||||
precisionOutput = std::cout.precision();
|
||||
|
|
@ -105,7 +126,7 @@ public:
|
|||
* @param _param unvalid Parameter
|
||||
*/
|
||||
template <class T>
|
||||
moVectorMonitor(eoValueParam<T> & _param) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), eotParam(NULL)
|
||||
moVectorMonitor(eoValueParam<T> & _param) : doubleParam(NULL), intParam(NULL), intLongParam(NULL), intLongLongParam(NULL), eotParam(NULL)
|
||||
{
|
||||
std::cerr << "Sorry the type can not be in a vector of moVectorMonitor" << std::endl;
|
||||
}
|
||||
|
|
@ -133,8 +154,11 @@ public:
|
|||
else
|
||||
if (intLongParam != NULL)
|
||||
valueVec.push_back((double) intLongParam->value());
|
||||
else
|
||||
eotVec.push_back(eotParam->value());
|
||||
else
|
||||
if (intLongLongParam != NULL)
|
||||
valueVec.push_back((double) intLongLongParam->value());
|
||||
else
|
||||
eotVec.push_back(eotParam->value());
|
||||
return *this ;
|
||||
}
|
||||
|
||||
|
|
@ -189,7 +213,10 @@ public:
|
|||
if (intLongParam != NULL)
|
||||
return intLongParam->longName();
|
||||
else
|
||||
return eotParam->longName();
|
||||
if (intLongLongParam != NULL)
|
||||
return intLongLongParam->longName();
|
||||
else
|
||||
return eotParam->longName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -259,6 +286,7 @@ protected:
|
|||
eoValueParam<double> * doubleParam ;
|
||||
eoValueParam<unsigned int> * intParam ;
|
||||
eoValueParam<unsigned long> * intLongParam ;
|
||||
eoValueParam<long long int> * intLongLongParam ;
|
||||
eoValueParam<EOT> * eotParam ;
|
||||
|
||||
std::vector<double> valueVec;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue