MADNESS 0.10.1
CoreFittingTarget Struct Reference
Inheritance diagram for CoreFittingTarget:
Collaboration diagram for CoreFittingTarget:

Public Member Functions

 CoreFittingTarget (World &world, Calculation &calc, CorePotential &cp)
tensorT gradient (const tensorT &x)
 Should return the derivative of the function.
bool provides_gradient () const
 Override this to return true if the derivative is implemented.
double value (const tensorT &x)
 Should return the value of the objective function.
Public Member Functions inherited from madness::OptimizationTargetInterface
virtual ~OptimizationTargetInterface ()
double test_gradient (Tensor< double > &x, double value_precision, bool doprint=true)
 Numerical test of the derivative ... optionally prints to stdout, returns max abs error.
virtual void value_and_gradient (const Tensor< double > &x, double &value, Tensor< double > &gradient)
 Reimplement if more efficient to evaluate both value and gradient in one call.

Public Attributes

Calculation & calc
CorePotential & cp
tensorT lastx
double r
World & world
double xsq

Constructor & Destructor Documentation

◆ CoreFittingTarget()

CoreFittingTarget::CoreFittingTarget ( World & world,
Calculation & calc,
CorePotential & cp )
inline

References calc, cp, r, world, and xsq.

Member Function Documentation

◆ gradient()

tensorT CoreFittingTarget::gradient ( const tensorT & x)
inlinevirtual

Should return the derivative of the function.

Reimplemented from madness::OptimizationTargetInterface.

References calc, cp, madness::Future< void >::value, madness::g, print(), r, tensor2vec(), and world.

◆ provides_gradient()

bool CoreFittingTarget::provides_gradient ( ) const
inlinevirtual

Override this to return true if the derivative is implemented.

Reimplemented from madness::OptimizationTargetInterface.

◆ value()

double CoreFittingTarget::value ( const tensorT & x)
inlinevirtual

Should return the value of the objective function.

Implements madness::OptimizationTargetInterface.

References calc, madness::copy(), cp, e(), lastx, print(), r, madness::Tensor< T >::sumsq(), tensor2vec(), world, and xsq.

Member Data Documentation

◆ calc

Calculation& CoreFittingTarget::calc

Referenced by CoreFittingTarget(), gradient(), and value().

◆ cp

CorePotential& CoreFittingTarget::cp

Referenced by CoreFittingTarget(), gradient(), and value().

◆ lastx

tensorT CoreFittingTarget::lastx
mutable

Referenced by value().

◆ r

double CoreFittingTarget::r
mutable

Referenced by CoreFittingTarget(), gradient(), and value().

◆ world

World& CoreFittingTarget::world

Referenced by CoreFittingTarget(), gradient(), and value().

◆ xsq

double CoreFittingTarget::xsq
mutable

Referenced by CoreFittingTarget(), and value().


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