Playa::ObjectiveBase Class Reference

#include <PlayaObjectiveBase.hpp>

Inheritance diagram for Playa::ObjectiveBase:

Playa::ObjectWithVerbosity Playa::Rosenbrock

List of all members.

Public Member Functions

 ObjectiveBase (int verb=0)
virtual ~ObjectiveBase ()
virtual void evalGrad (const Vector< double > &x, double &f, Vector< double > &grad) const =0
virtual void eval (const Vector< double > &x, double &f) const =0
virtual Vector< double > getInit () const =0
virtual double getInvHScale () const
virtual void iterationCallback (const Vector< double > &x, int iter) const
virtual void finalCallback (const Vector< double > &x) const
void setContextString (const string &str) const
const string & contextString () const
virtual int numFuncEvals () const
bool fdCheck (const Vector< double > &x, double tol, int verbosity=0) const

Protected Member Functions

virtual double fdStep () const


Detailed Description

Base class for differentiable objective functions.
Author:
Paul Boggs and Kevin Long

Definition at line 22 of file PlayaObjectiveBase.hpp.


Constructor & Destructor Documentation

Playa::ObjectiveBase::ObjectiveBase ( int  verb = 0  )  [inline]

Definition at line 27 of file PlayaObjectiveBase.hpp.

virtual Playa::ObjectiveBase::~ObjectiveBase (  )  [inline, virtual]

virtual dtor

Definition at line 30 of file PlayaObjectiveBase.hpp.


Member Function Documentation

virtual void Playa::ObjectiveBase::evalGrad ( const Vector< double > &  x,
double &  f,
Vector< double > &  grad 
) const [pure virtual]

evaluate objective function and gradient

Implemented in Playa::Rosenbrock.

virtual void Playa::ObjectiveBase::eval ( const Vector< double > &  x,
double &  f 
) const [pure virtual]

evaluate objective function without gradient.

Implemented in Playa::Rosenbrock.

virtual Vector<double> Playa::ObjectiveBase::getInit (  )  const [pure virtual]

return an initial guess for the design vector

Implemented in Playa::Rosenbrock.

virtual double Playa::ObjectiveBase::getInvHScale (  )  const [inline, virtual]

return an initial approximation to the scale for the inverse of the Hessian

Definition at line 44 of file PlayaObjectiveBase.hpp.

virtual void Playa::ObjectiveBase::iterationCallback ( const Vector< double > &  x,
int  iter 
) const [inline, virtual]

User-overrideable hook for any callbacks to be done at the end of each iteration. Default is a no-op.

Definition at line 48 of file PlayaObjectiveBase.hpp.

virtual void Playa::ObjectiveBase::finalCallback ( const Vector< double > &  x  )  const [inline, virtual]

User-overrideable hook for any callbacks to be done at the end of an optimization loop. Default is a no-op.

Definition at line 52 of file PlayaObjectiveBase.hpp.

void Playa::ObjectiveBase::setContextString ( const string &  str  )  const [inline]

Set a string describing the context in which the function is being called. This is intended to aid in reading diagnostic output.

Definition at line 58 of file PlayaObjectiveBase.hpp.

const string& Playa::ObjectiveBase::contextString (  )  const [inline]

Set a string describing the context in which the function is being called. This is intended to aid in reading diagnostic output.

Definition at line 64 of file PlayaObjectiveBase.hpp.

virtual int Playa::ObjectiveBase::numFuncEvals (  )  const [inline, virtual]

Return the number of evaluations

Definition at line 69 of file PlayaObjectiveBase.hpp.

bool Playa::ObjectiveBase::fdCheck ( const Vector< double > &  x,
double  tol,
int  verbosity = 0 
) const

Debugging utility to check the gradient by comparing to a finite difference gradient calculation. This is will be expensive.

eval at xPlus

Definition at line 15 of file PlayaObjectiveBase.cpp.

virtual double Playa::ObjectiveBase::fdStep (  )  const [inline, protected, virtual]

Definition at line 83 of file PlayaObjectiveBase.hpp.


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

doxygen