ROL
ROL_NonlinearLeastSquaresObjective.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Rapid Optimization Library (ROL) Package
4//
5// Copyright 2014 NTESS and the ROL contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef ROL_NONLINEARLEASTSQUARESOBJECTIVE_H
11#define ROL_NONLINEARLEASTSQUARESOBJECTIVE_H
12
13#include "ROL_Objective.hpp"
14#include "ROL_Constraint.hpp"
15#include "ROL_Types.hpp"
16
36namespace ROL {
37
38template<typename Real>
40private:
41 const Ptr<Constraint<Real> > con_;
43
44 Ptr<Vector<Real> > c1_, c2_, c1dual_, x_;
45
46public:
55 const Vector<Real> &optvec,
56 const Vector<Real> &convec,
57 const bool GNH = false);
58
59 void update( const Vector<Real> &x, UpdateType type, int iter = -1 ) override;
60 void update( const Vector<Real> &x, bool flag = true, int iter = -1 ) override;
61 Real value( const Vector<Real> &x, Real &tol ) override;
62 void gradient( Vector<Real> &g, const Vector<Real> &x, Real &tol ) override;
63 void hessVec( Vector<Real> &hv, const Vector<Real> &v, const Vector<Real> &x, Real &tol ) override;
64 void precond( Vector<Real> &Pv, const Vector<Real> &v, const Vector<Real> &x, Real &tol ) override;
65
66// Definitions for parametrized (stochastic) equality constraints
67public:
68 void setParameter(const std::vector<Real> &param) override;
69};
70
71} // namespace ROL
72
74
75#endif
Contains definitions of custom data types in ROL.
Defines the general constraint operator interface.
Provides the interface to evaluate nonlinear least squares objective functions.
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update objective function.
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Compute gradient.
void setParameter(const std::vector< Real > &param) override
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply Hessian approximation to vector.
void precond(Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply preconditioner to vector.
Real value(const Vector< Real > &x, Real &tol) override
Compute value.
Provides the interface to evaluate objective functions.
Defines the linear algebra or vector space interface.