ROL
ROL_RiskLessConstraint.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_RISKLESS_CONSTRAINT_H
11#define ROL_RISKLESS_CONSTRAINT_H
12
13#include "ROL_RiskVector.hpp"
14#include "ROL_Constraint.hpp"
15
16namespace ROL {
17
18template <class Real>
19class RiskLessConstraint : public Constraint<Real> {
20private:
21 const Ptr<Constraint<Real>> con_;
22
23public:
24 RiskLessConstraint(const Ptr<Constraint<Real>> &con);
25
26 void update(const Vector<Real> &x, UpdateType type, int iter = -1) override;
27 void update(const Vector<Real> &x, bool flag = true, int iter = -1) override;
28 void value(Vector<Real> &c, const Vector<Real> &x, Real &tol) override;
29 void applyJacobian(Vector<Real> &jv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
31 void applyAdjointJacobian(Vector<Real> &ajv, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
32 void applyAdjointHessian(Vector<Real> &ahuv, const Vector<Real> &u, const Vector<Real> &v, const Vector<Real> &x, Real &tol) override;
33
34public:
35 void setParameter(const std::vector<Real> &param) override;
36
37}; // class RiskLessConstraint
38
39} // namespace ROL
40
42
43#endif
Defines the general constraint operator interface.
void applyJacobian(Vector< Real > &jv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the constraint Jacobian at , , to vector .
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update constraint function.
const Ptr< Constraint< Real > > con_
void applyAdjointHessian(Vector< Real > &ahuv, const Vector< Real > &u, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the derivative of the adjoint of the constraint Jacobian at to vector in direction ,...
void applyAdjointJacobian(Vector< Real > &ajv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply the adjoint of the the constraint Jacobian at , , to vector .
void setParameter(const std::vector< Real > &param) override
void value(Vector< Real > &c, const Vector< Real > &x, Real &tol) override
Evaluate the constraint operator at .
Defines the linear algebra or vector space interface.