ROL
Toggle main menu visibility
Loading...
Searching...
No Matches
src
function
objective
ROL_LinearCombinationObjective.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_LINEARCOMBINATIONOBJECTIVE_H
11
#define ROL_LINEARCOMBINATIONOBJECTIVE_H
12
13
#include "
ROL_Objective.hpp
"
14
#include "ROL_Ptr.hpp"
15
16
namespace
ROL
{
17
18
template
<
typename
Real>
19
class
LinearCombinationObjective
:
public
Objective
<Real> {
20
private
:
21
const
std::vector<Ptr<Objective<Real>>>
obj_
;
22
std::vector<Real>
weights_
;
23
size_t
size_
;
24
25
Ptr<Vector<Real>>
xdual_
;
26
bool
initialized_
;
27
28
public
:
29
LinearCombinationObjective
(
const
std::vector<Ptr<
Objective<Real>
>> &obj);
30
LinearCombinationObjective
(
const
std::vector<Real> &weights,
31
const
std::vector<Ptr<
Objective<Real>
>> &obj);
32
33
void
update
(
const
Vector<Real>
&x,
UpdateType
type,
int
iter = -1)
override
;
34
void
update
(
const
Vector<Real>
&x,
bool
flag =
true
,
int
iter = -1)
override
;
35
Real
value
(
const
Vector<Real>
&x, Real &tol )
override
;
36
void
gradient
(
Vector<Real>
&g,
const
Vector<Real>
&x, Real &tol )
override
;
37
void
hessVec
(
Vector<Real>
&hv,
const
Vector<Real>
&v,
const
Vector<Real>
&x, Real &tol )
override
;
38
void
setParameter
(
const
std::vector<Real> ¶m)
override
;
39
40
};
// class LinearCombinationObjective
41
42
}
// namespace ROL
43
44
#include "
ROL_LinearCombinationObjective_Def.hpp
"
45
46
#endif
ROL_LinearCombinationObjective_Def.hpp
ROL_Objective.hpp
ROL::LinearCombinationObjective::setParameter
void setParameter(const std::vector< Real > ¶m) override
Definition
ROL_LinearCombinationObjective_Def.hpp:79
ROL::LinearCombinationObjective::size_
size_t size_
Definition
ROL_LinearCombinationObjective.hpp:23
ROL::LinearCombinationObjective::xdual_
Ptr< Vector< Real > > xdual_
Definition
ROL_LinearCombinationObjective.hpp:25
ROL::LinearCombinationObjective::obj_
const std::vector< Ptr< Objective< Real > > > obj_
Definition
ROL_LinearCombinationObjective.hpp:21
ROL::LinearCombinationObjective::initialized_
bool initialized_
Definition
ROL_LinearCombinationObjective.hpp:26
ROL::LinearCombinationObjective::value
Real value(const Vector< Real > &x, Real &tol) override
Definition
ROL_LinearCombinationObjective_Def.hpp:44
ROL::LinearCombinationObjective::LinearCombinationObjective
LinearCombinationObjective(const std::vector< Ptr< Objective< Real > > > &obj)
Definition
ROL_LinearCombinationObjective_Def.hpp:16
ROL::LinearCombinationObjective::gradient
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
Definition
ROL_LinearCombinationObjective_Def.hpp:53
ROL::LinearCombinationObjective::hessVec
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
Definition
ROL_LinearCombinationObjective_Def.hpp:66
ROL::LinearCombinationObjective::weights_
std::vector< Real > weights_
Definition
ROL_LinearCombinationObjective.hpp:22
ROL::LinearCombinationObjective::update
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Definition
ROL_LinearCombinationObjective_Def.hpp:30
ROL::ROL::Objective::Objective
Objective()
Definition
ROL_Constraint_SerialSimOpt.hpp:53
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