46 const char name_Gf[] =
"Gf";
49 namespace NLPInterfacePack {
114 true,std::logic_error
115 ,
"Error, the function calc_Gf_prod(...) is not implemented for the class "
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).
AbstractLinAlgPack::size_type size_type
std::string typeName(const T &t)
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
virtual size_type num_Gf_evals() const
Objective gradient evaluations count.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const ObjGradInfo obj_grad_info() const
Return objective gradient and zero order information.
NLPObjGrad()
Initialize to no reference set to calculation quanities.
virtual VectorMutable * get_Gf()
Return pointer passed to this->set_Gf().
virtual void unset_quantities()
Call to unset all storage quantities (both in this class and all subclasses).
ContainedClass * get_role_name(ContainedClass *role_name_, bool owns_role_name_, const char name[])
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).
void assert_role_name_set(const ContainedClass *role_name_, const char func_name[], const char name[])
Assert that the reference is set.
ContainedClass & role_name(ContainedClass *role_name_, bool owns_role_name_, const char name[])
AbstractLinAlgPack::value_type value_type
Abstract interface for mutable coordinate vectors {abstract}.
virtual VectorMutable & Gf()
Returns non-const *this->get_Gf().
virtual void initialize(bool test_setup=false)
Initialize the NLP before it is used.
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.