Skip to content

Commit

Permalink
fix some type inconsistence
Browse files Browse the repository at this point in the history
  • Loading branch information
gywn committed Nov 17, 2017
1 parent 7a953f3 commit ded9235
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/cma-es/cmaes.h
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ template <typename T> class CMAES {
delete[] B;
delete[] index;
delete[] publicFitness;
delete[]-- functionValues;
delete[] functionValues;
delete[]-- funcValueHistory;
}

Expand Down Expand Up @@ -887,9 +887,9 @@ template <typename T> class CMAES {
C = new T *[params.N];
B = new T *[params.N];
publicFitness = new T[params.lambda];
functionValues = new T[params.lambda + 1];
functionValues[0] = params.lambda;
++functionValues;
functionValues = new T[params.lambda];
// functionValues[0] = params.lambda;
// ++functionValues;
const int historySize = 10 + (int)ceil(3. * 10. * params.N / params.lambda);
funcValueHistory = new T[historySize + 1];
funcValueHistory[0] = (T)historySize;
Expand Down

0 comments on commit ded9235

Please sign in to comment.