|
ROL
|
Provides the std::vector implementation of the ROL::Vector interface. More...
#include <ROL_SROMVector.hpp>
Inheritance diagram for ROL::SROMVector< Real, Element >:Public Member Functions | |
| SROMVector (const Teuchos::RCP< std::vector< Element > > &pts_vec, const Teuchos::RCP< std::vector< Element > > &wts_vec, const Real const_pt=1.0, const Real const_wt=1.0) | |
| void | set (const Vector< Real > &x) |
| Set \(y \leftarrow x\) where \(y = \mathtt{*this}\). More... | |
| 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... | |
| 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... | |
| Teuchos::RCP< Vector< Real > > | clone () const |
| Clone to make a new (uninitialized) vector. More... | |
| Teuchos::RCP< const std::vector< Element > > | getPoint (const size_t i) const |
| void | setPoint (const size_t i, const std::vector< Element > &pt) |
| const Element | getWeight (const size_t i) const |
| void | setWeight (const size_t i, const Element wt) |
| const size_t | getDimension (void) const |
| const size_t | getNumSamples (void) const |
Public Member Functions inherited from ROL::Vector< Real > | |
| virtual | ~Vector () |
| virtual void | axpy (const Real alpha, const Vector &x) |
| Compute \(y \leftarrow \alpha x + y\) where \(y = \mathtt{*this}\). More... | |
| 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 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 void | applyUnary (const Elementwise::UnaryFunction< Real > &f) |
| virtual void | applyBinary (const Elementwise::BinaryFunction< Real > &f, const Vector &x) |
| virtual Real | reduce (const Elementwise::ReductionOp< Real > &r) const |
| 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... | |
Private Attributes | |
| Teuchos::RCP< std::vector< Element > > | pts_vec_ |
| Teuchos::RCP< std::vector< Element > > | wts_vec_ |
| size_t | dimension_ |
| size_t | numSamples_ |
| Real | const_pt_ |
| Real | const_wt_ |
Provides the std::vector implementation of the ROL::Vector interface.
Definition at line 60 of file ROL_SROMVector.hpp.
|
inline |
Definition at line 73 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::numSamples_.
Referenced by ROL::SROMVector< Real, Element >::clone().
|
inlinevirtual |
Set \(y \leftarrow x\) where \(y = \mathtt{*this}\).
| [in] | x | is a vector. |
On return \(\mathtt{*this} = x\). Uses zero and plus methods for the computation. Please overload if a more efficient implementation is needed.
Reimplemented from ROL::Vector< Real >.
Definition at line 82 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::dimension_, ROL::SROMVector< Real, Element >::getPoint(), ROL::SROMVector< Real, Element >::getWeight(), and ROL::SROMVector< Real, Element >::numSamples_.
|
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 92 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::dimension_, ROL::SROMVector< Real, Element >::getPoint(), ROL::SROMVector< Real, Element >::getWeight(), and ROL::SROMVector< Real, Element >::numSamples_.
|
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 102 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::dimension_, and ROL::SROMVector< Real, Element >::numSamples_.
|
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 111 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::dimension_, ROL::SROMVector< Real, Element >::getPoint(), ROL::SROMVector< Real, Element >::getWeight(), and ROL::SROMVector< Real, Element >::numSamples_.
Referenced by ROL::SROMVector< Real, Element >::norm().
|
inlinevirtual |
Returns \( \| y \| \) where \(y = \mathtt{*this}\).
Implements ROL::Vector< Real >.
Definition at line 123 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::dot().
|
inlinevirtual |
Clone to make a new (uninitialized) vector.
Provides the means of allocating temporary memory in ROL.
Implements ROL::Vector< Real >.
Definition at line 129 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::const_pt_, ROL::SROMVector< Real, Element >::const_wt_, and ROL::SROMVector< Real, Element >::SROMVector().
|
inline |
Definition at line 135 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::dimension_.
Referenced by ROL::SROMVector< Real, Element >::dot(), ROL::PointwiseCDFObjective< Real >::gradientCDF(), ROL::CDFObjective< Real >::gradientCDF(), ROL::PointwiseCDFObjective< Real >::hessVecCDF(), ROL::CDFObjective< Real >::hessVecCDF(), ROL::SROMBoundConstraint< Real >::isFeasible(), ROL::MomentObjective< Real >::momentGradient(), ROL::MomentObjective< Real >::momentHessVec(), ROL::MomentObjective< Real >::momentValue(), ROL::SROMVector< Real, Element >::plus(), ROL::SROMBoundConstraint< Real >::project(), ROL::SROMBoundConstraint< Real >::pruneActive(), ROL::SROMBoundConstraint< Real >::pruneLowerActive(), ROL::SROMGenerator< Real >::pruneSamples(), ROL::SROMBoundConstraint< Real >::pruneUpperActive(), ROL::SROMVector< Real, Element >::set(), ROL::PointwiseCDFObjective< Real >::value(), ROL::PointwiseCDFObjective< Real >::valueCDF(), and ROL::CDFObjective< Real >::valueCDF().
|
inline |
Definition at line 143 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::dimension_.
Referenced by ROL::SROMEqualityConstraint< Real >::applyAdjointJacobian(), ROL::PointwiseCDFObjective< Real >::gradient(), ROL::MomentObjective< Real >::gradient(), ROL::CDFObjective< Real >::gradient(), ROL::MomentObjective< Real >::hessVec(), ROL::CDFObjective< Real >::hessVec(), ROL::SROMBoundConstraint< Real >::project(), ROL::SROMBoundConstraint< Real >::setVectorToLowerBound(), and ROL::SROMBoundConstraint< Real >::setVectorToUpperBound().
|
inline |
Definition at line 149 of file ROL_SROMVector.hpp.
Referenced by ROL::SROMEqualityConstraint< Real >::applyJacobian(), ROL::SROMVector< Real, Element >::dot(), ROL::PointwiseCDFObjective< Real >::gradientCDF(), ROL::CDFObjective< Real >::gradientCDF(), ROL::PointwiseCDFObjective< Real >::hessVecCDF(), ROL::CDFObjective< Real >::hessVecCDF(), ROL::SROMBoundConstraint< Real >::isFeasible(), ROL::MomentObjective< Real >::momentGradient(), ROL::MomentObjective< Real >::momentHessVec(), ROL::MomentObjective< Real >::momentValue(), ROL::SROMVector< Real, Element >::plus(), ROL::SROMBoundConstraint< Real >::project(), ROL::SROMBoundConstraint< Real >::pruneActive(), ROL::SROMBoundConstraint< Real >::pruneLowerActive(), ROL::SROMGenerator< Real >::pruneSamples(), ROL::SROMBoundConstraint< Real >::pruneUpperActive(), ROL::SROMVector< Real, Element >::set(), ROL::SROMEqualityConstraint< Real >::value(), ROL::PointwiseCDFObjective< Real >::valueCDF(), and ROL::CDFObjective< Real >::valueCDF().
|
inline |
Definition at line 153 of file ROL_SROMVector.hpp.
Referenced by ROL::SROMEqualityConstraint< Real >::applyAdjointJacobian(), ROL::PointwiseCDFObjective< Real >::gradient(), ROL::MomentObjective< Real >::gradient(), ROL::CDFObjective< Real >::gradient(), ROL::MomentObjective< Real >::hessVec(), ROL::CDFObjective< Real >::hessVec(), ROL::SROMBoundConstraint< Real >::project(), ROL::SROMBoundConstraint< Real >::setVectorToLowerBound(), and ROL::SROMBoundConstraint< Real >::setVectorToUpperBound().
|
inline |
Definition at line 157 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::dimension_.
Referenced by ROL::SROMEqualityConstraint< Real >::applyAdjointJacobian(), ROL::PointwiseCDFObjective< Real >::gradient(), ROL::MomentObjective< Real >::gradient(), ROL::CDFObjective< Real >::gradient(), ROL::MomentObjective< Real >::hessVec(), ROL::CDFObjective< Real >::hessVec(), ROL::PointwiseCDFObjective< Real >::value(), ROL::MomentObjective< Real >::value(), and ROL::CDFObjective< Real >::value().
|
inline |
Definition at line 161 of file ROL_SROMVector.hpp.
References ROL::SROMVector< Real, Element >::numSamples_.
Referenced by ROL::SROMEqualityConstraint< Real >::applyAdjointJacobian(), ROL::PointwiseCDFObjective< Real >::gradientCDF(), ROL::CDFObjective< Real >::gradientCDF(), ROL::PointwiseCDFObjective< Real >::hessVecCDF(), ROL::CDFObjective< Real >::hessVecCDF(), ROL::SROMBoundConstraint< Real >::isFeasible(), ROL::MomentObjective< Real >::momentGradient(), ROL::MomentObjective< Real >::momentHessVec(), ROL::MomentObjective< Real >::momentValue(), ROL::SROMBoundConstraint< Real >::project(), ROL::SROMBoundConstraint< Real >::pruneActive(), ROL::SROMBoundConstraint< Real >::pruneLowerActive(), ROL::SROMBoundConstraint< Real >::pruneUpperActive(), ROL::SROMBoundConstraint< Real >::setVectorToLowerBound(), ROL::SROMBoundConstraint< Real >::setVectorToUpperBound(), ROL::PointwiseCDFObjective< Real >::value(), ROL::PointwiseCDFObjective< Real >::valueCDF(), and ROL::CDFObjective< Real >::valueCDF().
|
private |
Definition at line 63 of file ROL_SROMVector.hpp.
|
private |
Definition at line 64 of file ROL_SROMVector.hpp.
|
private |
Definition at line 65 of file ROL_SROMVector.hpp.
Referenced by ROL::SROMVector< Real, Element >::dot(), ROL::SROMVector< Real, Element >::getDimension(), ROL::SROMVector< Real, Element >::getPoint(), ROL::SROMVector< Real, Element >::plus(), ROL::SROMVector< Real, Element >::scale(), ROL::SROMVector< Real, Element >::set(), and ROL::SROMVector< Real, Element >::setPoint().
|
private |
Definition at line 66 of file ROL_SROMVector.hpp.
Referenced by ROL::SROMVector< Real, Element >::dot(), ROL::SROMVector< Real, Element >::getNumSamples(), ROL::SROMVector< Real, Element >::plus(), ROL::SROMVector< Real, Element >::scale(), ROL::SROMVector< Real, Element >::set(), and ROL::SROMVector< Real, Element >::SROMVector().
|
private |
Definition at line 68 of file ROL_SROMVector.hpp.
Referenced by ROL::SROMVector< Real, Element >::clone().
|
private |
Definition at line 69 of file ROL_SROMVector.hpp.
Referenced by ROL::SROMVector< Real, Element >::clone().
1.8.11