Skip to content

Commit b22b3d1

Browse files
author
Emmanuel Benazera
committed
fixed auto init of TPA, ref #88, #103
1 parent 63cca48 commit b22b3d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmaparameters.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ namespace libcmaes
132132
void CMAParameters<TGenoPheno>::set_tpa(const int &b)
133133
{
134134
this->_tpa = b;
135-
if (this->_tpa > 0)
135+
if (this->_tpa == 2)
136136
_dsigma = 4 - 3.6 / std::sqrt(Parameters<TGenoPheno>::_dim);
137137
else if (!this->_vd)
138138
_dsigma = 1.0+_csigma+2.0*std::max(0.0,sqrt((_muw-1)/(Parameters<TGenoPheno>::_dim+1))-1); // default

0 commit comments

Comments
 (0)