42 #ifndef NLP_OBJ_GRADIENT_H
43 #define NLP_OBJ_GRADIENT_H
47 namespace NLPInterfacePack {
219 virtual void calc_Gf(
const Vector& x,
bool newx =
true)
const;
270 : Gf(NULL),
f(NULL),
c(NULL)
274 : Gf(Gf_in),
f(first_order_info_in.
f),
c(first_order_info_in.
c)
339 #endif // NLP_OBJ_GRADIENT_H
NLP interface class that adds gradient information for the objective function {abstract}.
void initialize(bool test_setup)
Initialize the NLP for its first use.
void unset_quantities()
Call to unset all storage quantities (both in this class and all subclasses).
ObjGradInfo(VectorMutable *Gf_in, const ZeroOrderInfo &first_order_info_in)
AbstractLinAlgPack::size_type size_type
Struct for gradient (objective), objective and constriants (pointers)
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
VectorMutable * c
Pointer to constraints residual c (may be NULL if not set)
virtual size_type num_Gf_evals() const
Objective gradient evaluations count.
VectorMutable * Gf
Pointer to gradient of objective function Gf (may be NULL if not set)
const ZeroOrderInfo zero_order_info() const
Return pointer to set quantities.
const ObjGradInfo obj_grad_info() const
Return objective gradient and zero order information.
NLPObjGrad()
Initialize to no reference set to calculation quanities.
value_type * f
Pointer to objective function f (may be NULL if not set)
virtual VectorMutable * get_Gf()
Return pointer passed to this->set_Gf().
AbstractLinAlgPack::VectorMutable VectorMutable
virtual bool supports_Gf_prod() const
Determine if the objective gradient product is supported or not.
virtual void imp_calc_Gf(const Vector &x, bool newx, const ObjGradInfo &obj_grad_info) const =0
Overridden to compute f(x) and perhaps c(x) (if multiple calculaiton = true).
Struct for objective and constriants (pointer).
NLP interface class {abstract}.
AbstractLinAlgPack::value_type value_type
Abstract interface for mutable coordinate vectors {abstract}.
virtual VectorMutable & Gf()
Returns non-const *this->get_Gf().
virtual void set_Gf(VectorMutable *Gf)
Set a pointer to a vector to be updated when this->calc_Gf() is called.
virtual void calc_Gf(const Vector &x, bool newx=true) const
Update the vector for Gf at the point x and put it in the stored reference.
virtual bool supports_Gf() const
Determine if the objective gradient is supported or not.
virtual value_type calc_Gf_prod(const Vector &x, const Vector &d, bool newx=true) const
Calculate the inner product Gf(x)'*d at the point x and put it in the stored reference.