ROL
src
function
ROL_ScalarController_Def.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_SCALARCONTROLLER_DEF_H
11
#define ROL_SCALARCONTROLLER_DEF_H
12
13
namespace
ROL
{
14
15
template
<
class
Real,
class
Key>
16
ScalarController<Real,Key>::ScalarController
(
void
) :
VectorController
<Real,Key>() {}
17
18
template
<
class
Real,
class
Key>
19
bool
ScalarController<Real,Key>::get
(Real &x,
const
Key ¶m) {
20
SingletonVector<Real>
xv(Real(0));
21
bool
flag =
VectorController<Real,Key>::get
(xv,param);
22
x = xv.
getValue
();
23
return
flag;
24
}
25
26
template
<
class
Real,
class
Key>
27
void
ScalarController<Real,Key>::set
(Real x,
const
Key ¶m) {
28
SingletonVector<Real>
xv(x);
29
VectorController<Real,Key>::set
(xv,param);
30
}
31
32
}
// namespace ROL
33
34
#endif
ROL::ROL::VectorController::VectorController
VectorController(void)
Constructor.
Definition
ROL_VectorController_Def.hpp:16
ROL::ScalarController::set
void set(Real x, const Key ¶m)
Definition
ROL_ScalarController_Def.hpp:27
ROL::ScalarController::get
bool get(Real &x, const Key ¶m)
Definition
ROL_ScalarController_Def.hpp:19
ROL::ScalarController::ScalarController
ScalarController(void)
Definition
ROL_ScalarController_Def.hpp:16
ROL::SingletonVector
Definition
ROL_SingletonVector.hpp:25
ROL::SingletonVector::getValue
Real getValue() const
Definition
ROL_SingletonVector.hpp:41
ROL::VectorController::set
const Ptr< Vector< Real > > set(const Key ¶m)
Set the vector associated with provided key. This assumes the vector data will be changed.
ROL::VectorController::get
const Ptr< const Vector< Real > > get(const Key ¶m) const
Return the vector associated with provided key.
ROL
Definition
ROL_ElementwiseVector.hpp:27
Generated by
1.15.0