ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
function
objective
ROL_SlacklessObjective.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_SLACKLESSOBJECTIVE_HPP
11
#define ROL_SLACKLESSOBJECTIVE_HPP
12
13
#include "
ROL_Objective.hpp
"
14
#include "
ROL_PartitionedVector.hpp
"
15
21
22
namespace
ROL
{
23
24
template
<
typename
Real>
25
class
SlacklessObjective
:
public
Objective
<Real> {
26
private
:
27
const
Ptr<Objective<Real>>
obj_
;
28
29
public
:
30
~SlacklessObjective
() {}
31
SlacklessObjective
(
const
Ptr<
Objective<Real>
> &obj );
32
33
Ptr<Objective<Real>>
getObjective
(
void
)
const
;
34
35
void
update
(
const
Vector<Real>
&x,
UpdateType
type,
int
iter = -1 )
override
;
36
void
update
(
const
Vector<Real>
&x,
bool
flag =
true
,
int
iter = -1 )
override
;
37
Real
value
(
const
Vector<Real>
&x, Real &tol )
override
;
38
Real
dirDeriv
(
const
Vector<Real>
&x,
const
Vector<Real>
&d, Real &tol )
override
;
39
void
gradient
(
Vector<Real>
&g,
const
Vector<Real>
&x, Real &tol )
override
;
40
void
hessVec
(
Vector<Real>
&hv,
const
Vector<Real>
&v,
const
Vector<Real>
&x, Real &tol )
override
;
41
void
invHessVec
(
Vector<Real>
&ihv,
const
Vector<Real>
&v,
const
Vector<Real>
&x, Real &tol )
override
;
42
void
precond
(
Vector<Real>
&Pv,
const
Vector<Real>
&v,
const
Vector<Real>
&x, Real &tol )
override
;
43
44
// Definitions for parametrized (stochastic) objective functions
45
public
:
46
void
setParameter
(
const
std::vector<Real> ¶m)
override
;
47
48
private
:
49
Ptr<Vector<Real>>
getOpt
(
Vector<Real>
&xs )
const
;
50
Ptr<const Vector<Real>>
getOpt
(
const
Vector<Real>
&xs )
const
;
51
void
zeroSlack
(
Vector<Real>
&x )
const
;
52
};
// class SlacklessObjective
53
54
}
// namespace ROL
55
56
#include "
ROL_SlacklessObjective_Def.hpp
"
57
58
#endif
// ROL_SLACKLESSOBJECTIVE_HPP
59
ROL_Objective.hpp
ROL_PartitionedVector.hpp
ROL_SlacklessObjective_Def.hpp
ROL::Objective
Provides the interface to evaluate objective functions.
Definition
ROL_Objective.hpp:44
ROL::ROL::Objective::Objective
Objective()
Definition
ROL_Constraint_SerialSimOpt.hpp:53
ROL::SlacklessObjective::value
Real value(const Vector< Real > &x, Real &tol) override
Definition
ROL_SlacklessObjective_Def.hpp:34
ROL::SlacklessObjective::SlacklessObjective
SlacklessObjective(const Ptr< Objective< Real > > &obj)
Definition
ROL_SlacklessObjective_Def.hpp:16
ROL::SlacklessObjective::obj_
const Ptr< Objective< Real > > obj_
Definition
ROL_SlacklessObjective.hpp:27
ROL::SlacklessObjective::~SlacklessObjective
~SlacklessObjective()
Definition
ROL_SlacklessObjective.hpp:30
ROL::SlacklessObjective::invHessVec
void invHessVec(Vector< Real > &ihv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Definition
ROL_SlacklessObjective_Def.hpp:56
ROL::SlacklessObjective::gradient
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Definition
ROL_SlacklessObjective_Def.hpp:44
ROL::SlacklessObjective::setParameter
void setParameter(const std::vector< Real > ¶m) override
Definition
ROL_SlacklessObjective_Def.hpp:78
ROL::SlacklessObjective::dirDeriv
Real dirDeriv(const Vector< Real > &x, const Vector< Real > &d, Real &tol) override
Definition
ROL_SlacklessObjective_Def.hpp:39
ROL::SlacklessObjective::update
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Definition
ROL_SlacklessObjective_Def.hpp:24
ROL::SlacklessObjective::precond
void precond(Vector< Real > &Pv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Definition
ROL_SlacklessObjective_Def.hpp:67
ROL::SlacklessObjective::getObjective
Ptr< Objective< Real > > getObjective(void) const
Definition
ROL_SlacklessObjective_Def.hpp:19
ROL::SlacklessObjective::getOpt
Ptr< Vector< Real > > getOpt(Vector< Real > &xs) const
Definition
ROL_SlacklessObjective_Def.hpp:84
ROL::SlacklessObjective::zeroSlack
void zeroSlack(Vector< Real > &x) const
Definition
ROL_SlacklessObjective_Def.hpp:94
ROL::SlacklessObjective::hessVec
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Definition
ROL_SlacklessObjective_Def.hpp:50
ROL::Vector
Defines the linear algebra or vector space interface.
Definition
ROL_Vector.hpp:51
ROL
Definition
ROL_ElementwiseVector.hpp:27
ROL::UpdateType
UpdateType
Definition
ROL_UpdateType.hpp:18
Generated by
1.17.0