ROL
|
#include <ROL_CVaRVector.hpp>
Public Member Functions | |
CVaRVector (Real &var, Teuchos::RCP< Vector< Real > > &vec) | |
void | plus (const Vector< Real > &x) |
Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\). More... | |
void | scale (const Real alpha) |
Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\). More... | |
void | axpy (const Real alpha, const Vector< Real > &x) |
Compute \(y \leftarrow \alpha x + y\) where \(y = \mathtt{*this}\). More... | |
Real | dot (const Vector< Real > &x) const |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More... | |
Real | norm () const |
Returns \( \| y \| \) where \(y = \mathtt{*this}\). More... | |
const Real | getVaR () const |
Teuchos::RCP< const Vector < Real > > | getVector () const |
Teuchos::RCP< Vector< Real > > | clone () const |
Clone to make a new (uninitialized) vector. More... | |
void | setVaR (const Real var) |
void | setVector (const Vector< Real > &vec) |
![]() | |
virtual | ~Vector () |
virtual void | zero () |
Set to zero vector. More... | |
virtual Teuchos::RCP< Vector > | basis (const int i) const |
Return i-th basis vector. More... | |
virtual int | dimension () const |
Return dimension of the vector space. More... | |
virtual void | set (const Vector &x) |
Set \(y \leftarrow x\) where \(y = \mathtt{*this}\). More... | |
virtual const Vector & | dual () const |
Return dual representation of \(\mathtt{*this}\), for example, the result of applying a Riesz map, or change of basis, or change of memory layout. More... | |
virtual std::vector< Real > | checkVector (const Vector< Real > &x, const Vector< Real > &y, const bool printToStream=true, std::ostream &outStream=std::cout) const |
Verify vector-space methods. More... | |
Protected Attributes | |
Real | var_ |
Teuchos::RCP< Vector< Real > > | vec_ |
Definition at line 52 of file ROL_CVaRVector.hpp.
|
inline |
Definition at line 58 of file ROL_CVaRVector.hpp.
Referenced by ROL::CVaRVector< Real >::clone().
|
inlinevirtual |
Compute \(y \leftarrow y + x\), where \(y = \mathtt{*this}\).
[in] | x | is the vector to be added to \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \mathtt{*this} + x\).
Implements ROL::Vector< Real >.
Definition at line 60 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::getVaR(), ROL::CVaRVector< Real >::getVector(), ROL::CVaRVector< Real >::var_, and ROL::CVaRVector< Real >::vec_.
|
inlinevirtual |
Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\).
[in] | alpha | is the scaling of \(\mathtt{*this}\). |
On return \(\mathtt{*this} = \alpha (\mathtt{*this}) \).
Implements ROL::Vector< Real >.
Definition at line 67 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::var_, and ROL::CVaRVector< Real >::vec_.
|
inlinevirtual |
Compute \(y \leftarrow \alpha x + y\) where \(y = \mathtt{*this}\).
[in] | alpha | is the scaling of x. |
[in] | x | is a vector. |
On return \(\mathtt{*this} = \mathtt{*this} + \alpha x \). Uses clone, set, scale and plus for the computation. Please overload if a more efficient implementation is needed.
Reimplemented from ROL::Vector< Real >.
Definition at line 72 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::getVaR(), ROL::CVaRVector< Real >::getVector(), ROL::CVaRVector< Real >::var_, and ROL::CVaRVector< Real >::vec_.
|
inlinevirtual |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).
[in] | x | is the vector that forms the dot product with \(\mathtt{*this}\). |
Implements ROL::Vector< Real >.
Definition at line 79 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::getVaR(), ROL::CVaRVector< Real >::getVector(), ROL::CVaRVector< Real >::var_, and ROL::CVaRVector< Real >::vec_.
Referenced by ROL::CVaRVector< Real >::norm().
|
inlinevirtual |
Returns \( \| y \| \) where \(y = \mathtt{*this}\).
Implements ROL::Vector< Real >.
Definition at line 85 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::dot().
|
inline |
Definition at line 89 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::var_.
Referenced by ROL::CVaRVector< Real >::axpy(), ROL::CVaRVector< Real >::dot(), ROL::CVaRVector< Real >::plus(), ROL::CVaR< Real >::reset(), and ROL::ExpectationQuad< Real >::reset().
|
inline |
Definition at line 93 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::vec_.
Referenced by ROL::CVaRVector< Real >::axpy(), ROL::CVaRVector< Real >::dot(), ROL::CVaRVector< Real >::plus(), ROL::CVaR< Real >::reset(), and ROL::ExpectationQuad< Real >::reset().
|
inlinevirtual |
Clone to make a new (uninitialized) vector.
Provides the means of allocating temporary memory in ROL.
Implements ROL::Vector< Real >.
Definition at line 97 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::CVaRVector(), and ROL::CVaRVector< Real >::vec_.
|
inline |
Definition at line 104 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::var_.
Referenced by ROL::CVaR< Real >::getGradient(), ROL::ExpectationQuad< Real >::getGradient(), ROL::CVaR< Real >::getHessVec(), and ROL::ExpectationQuad< Real >::getHessVec().
|
inline |
Definition at line 108 of file ROL_CVaRVector.hpp.
References ROL::CVaRVector< Real >::vec_.
Referenced by ROL::CVaR< Real >::getGradient(), ROL::ExpectationQuad< Real >::getGradient(), ROL::CVaR< Real >::getHessVec(), and ROL::ExpectationQuad< Real >::getHessVec().
|
protected |
Definition at line 54 of file ROL_CVaRVector.hpp.
Referenced by ROL::CVaRVector< Real >::axpy(), ROL::CVaRVector< Real >::dot(), ROL::CVaRVector< Real >::getVaR(), ROL::CVaRVector< Real >::plus(), ROL::CVaRVector< Real >::scale(), and ROL::CVaRVector< Real >::setVaR().
|
protected |
Definition at line 55 of file ROL_CVaRVector.hpp.
Referenced by ROL::CVaRVector< Real >::axpy(), ROL::CVaRVector< Real >::clone(), ROL::CVaRVector< Real >::dot(), ROL::CVaRVector< Real >::getVector(), ROL::CVaRVector< Real >::plus(), ROL::CVaRVector< Real >::scale(), and ROL::CVaRVector< Real >::setVector().