OpenMD 3.0
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
QuantLib::ObjectiveFunction Class Referenceabstract

Objective function abstract class for optimization problem. More...

#include <ObjectiveFunction.hpp>

+ Inheritance diagram for QuantLib::ObjectiveFunction:

Public Member Functions

virtual RealType value (const DynamicVector< RealType > &x)=0
 method to overload to compute the objective function value in x
 
virtual void gradient (DynamicVector< RealType > &grad, const DynamicVector< RealType > &x)
 method to overload to compute grad_f, the first derivative of
 
virtual RealType valueAndGradient (DynamicVector< RealType > &grad, const DynamicVector< RealType > &x)
 method to overload to compute grad_f, the first derivative
 
virtual RealType finiteDifferenceEpsilon () const
 Default epsilon for finite difference method :
 

Detailed Description

Objective function abstract class for optimization problem.

Definition at line 35 of file ObjectiveFunction.hpp.

Constructor & Destructor Documentation

◆ ~ObjectiveFunction()

virtual QuantLib::ObjectiveFunction::~ObjectiveFunction ( )
inlinevirtual

Definition at line 37 of file ObjectiveFunction.hpp.

Member Function Documentation

◆ finiteDifferenceEpsilon()

virtual RealType QuantLib::ObjectiveFunction::finiteDifferenceEpsilon ( ) const
inlinevirtual

Default epsilon for finite difference method :

Definition at line 67 of file ObjectiveFunction.hpp.

Referenced by gradient().

◆ gradient()

virtual void QuantLib::ObjectiveFunction::gradient ( DynamicVector< RealType > & grad,
const DynamicVector< RealType > & x )
inlinevirtual

method to overload to compute grad_f, the first derivative of

Reimplemented in OpenMD::FluctuatingChargeObjectiveFunction, OpenMD::BoxObjectiveFunction, and OpenMD::PotentialEnergyObjectiveFunction.

Definition at line 43 of file ObjectiveFunction.hpp.

References finiteDifferenceEpsilon(), and value().

Referenced by QuantLib::Problem::gradient(), and valueAndGradient().

◆ value()

virtual RealType QuantLib::ObjectiveFunction::value ( const DynamicVector< RealType > & x)
pure virtual

method to overload to compute the objective function value in x

Implemented in OpenMD::FluctuatingChargeObjectiveFunction, OpenMD::BoxObjectiveFunction, and OpenMD::PotentialEnergyObjectiveFunction.

Referenced by gradient(), QuantLib::Problem::value(), and valueAndGradient().

◆ valueAndGradient()

virtual RealType QuantLib::ObjectiveFunction::valueAndGradient ( DynamicVector< RealType > & grad,
const DynamicVector< RealType > & x )
inlinevirtual

method to overload to compute grad_f, the first derivative

Reimplemented in OpenMD::FluctuatingChargeObjectiveFunction, OpenMD::BoxObjectiveFunction, and OpenMD::PotentialEnergyObjectiveFunction.

Definition at line 60 of file ObjectiveFunction.hpp.

References gradient(), and value().

Referenced by QuantLib::Problem::valueAndGradient().


The documentation for this class was generated from the following file: