24#ifndef optimization_objectivefunction_h
25#define optimization_objectivefunction_h
47 for (
size_t i = 0; i < x.size(); i++) {
52 grad[i] = 0.5 * (fp - fm) / eps;
Dynamically-sized vector class.
Objective function abstract class for optimization problem.
virtual RealType finiteDifferenceEpsilon() const
Default epsilon for finite difference method :
virtual RealType value(const DynamicVector< RealType > &x)=0
method to overload to compute the objective function value in x
virtual RealType valueAndGradient(DynamicVector< RealType > &grad, const DynamicVector< RealType > &x)
method to overload to compute grad_f, the first derivative
virtual void gradient(DynamicVector< RealType > &grad, const DynamicVector< RealType > &x)
method to overload to compute grad_f, the first derivative of
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.