#include <optimisationProblem/benchmark/sphereFunction.hpp>

#include <cmath>
using std::sqrt;
using std::pow;

#include <armadillo>
using arma::norm;

namespace hop {
  SphereFunction::SphereFunction(const unsigned int &numberOfDimensions) : BenchmarkProblem(numberOfDimensions) {

  }

  double SphereFunction::getObjectiveValueImplementation(const Col<double> &parameter) {
    return pow(norm(getRandomParameterTranslation(parameter)), 2);
  }
}

#include <optimisationProblem/benchmark/sphereFunction.hpp>

#include <cmath>
using std::sqrt;
using std::pow;

#include <armadillo>
using arma::norm;

namespace hop {
  SphereFunction::SphereFunction(const unsigned int &numberOfDimensions) : BenchmarkProblem(numberOfDimensions) {

  }

  double SphereFunction::getObjectiveValueImplementation(const Col<double> &parameter) const {
    return pow(norm(getRandomParameterTranslation(parameter)), 2);
  }
}

Set sphere function's objective value method to be const (missed this one)
devel: Set sphere function's objective value method to be const (missed this one)

Const means in this sense, that they do not adjust any class field, etc.
The return value however is not set to be const.

Signed-off-by: Sebastian Niemann <c15bc648238b8fcefd2112b1efddcb822e686c46@sra.uni-hannover.de>
