ROL
ROL_RiskLessObjective.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_RISKLESSOBJECTIVE_HPP
11#define ROL_RISKLESSOBJECTIVE_HPP
12
13#include "ROL_RiskVector.hpp"
14#include "ROL_Objective.hpp"
15
16namespace ROL {
17
18template<typename Real>
19class RiskLessObjective : public Objective<Real> {
20private:
21 const Ptr<Objective<Real>> obj_;
22
23public:
24 RiskLessObjective(const Ptr<Objective<Real>> &obj);
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 Real value( const Vector<Real> &x, Real &tol ) override;
29 void gradient( Vector<Real> &g, const Vector<Real> &x, Real &tol ) override;
30 void hessVec( Vector<Real> &hv, const Vector<Real> &v,
31 const Vector<Real> &x, Real &tol ) override;
32 void precond( Vector<Real> &Pv, const Vector<Real> &v,
33 const Vector<Real> &x, Real &tol ) override;
34 void setParameter(const std::vector<Real> &param) override;
35};
36
37}
38
40
41#endif
Provides the interface to evaluate objective functions.
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.
void setParameter(const std::vector< Real > &param) override
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Compute gradient.
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Apply Hessian approximation to vector.
const Ptr< Objective< Real > > obj_
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Update objective function.
Defines the linear algebra or vector space interface.