ROL
|
Provides the std::vector implementation of the ROL::Vector interface. More...
#include <ROL_AtomVector.hpp>
Public Member Functions | |
AtomVector (const Teuchos::RCP< std::vector< Real > > &vec, const int numMySamples, const int dimension) | |
Teuchos::RCP< const std::vector< Real > > | getAtom (const int i) const |
void | setAtom (const int i, const std::vector< Real > &pt) |
int | getNumMyAtoms (void) const |
int | getDimension (void) const |
![]() | |
StdVector (const Teuchos::RCP< std::vector< Real > > &std_vec) | |
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 | axpy (const Real alpha, const Vector< Real > &x) |
Compute \(y \leftarrow \alpha x + y\) where \(y = \mathtt{*this}\). More... | |
void | scale (const Real alpha) |
Compute \(y \leftarrow \alpha y\) where \(y = \mathtt{*this}\). More... | |
virtual 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... | |
virtual Teuchos::RCP< Vector< Real > > | clone () const |
Clone to make a new (uninitialized) vector. More... | |
Teuchos::RCP< const std::vector< Real > > | getVector () const |
Teuchos::RCP< std::vector< Real > > | getVector () |
Teuchos::RCP< Vector< Real > > | basis (const int i) const |
Return i-th basis vector. More... | |
int | dimension () const |
Return dimension of the vector space. More... | |
void | applyUnary (const Elementwise::UnaryFunction< Real > &f) |
void | applyBinary (const Elementwise::BinaryFunction< Real > &f, const Vector< Real > &x) |
Real | reduce (const Elementwise::ReductionOp< Real > &r) const |
![]() | |
virtual | ~Vector () |
virtual void | zero () |
Set to zero vector. 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... | |
Private Types | |
typedef std::vector< Real >::size_type | uint |
Private Attributes | |
const uint | numMySamples_ |
const uint | dimension_ |
Provides the std::vector implementation of the ROL::Vector interface.
Definition at line 64 of file ROL_AtomVector.hpp.
|
private |
Definition at line 65 of file ROL_AtomVector.hpp.
|
inline |
Definition at line 71 of file ROL_AtomVector.hpp.
|
inline |
Definition at line 75 of file ROL_AtomVector.hpp.
References ROL::AtomVector< Real >::dimension_, and ROL::StdVector< Real, Element >::getVector().
Referenced by ROL::CDFObjective< Real >::gradientCDF(), ROL::CDFObjective< Real >::hessVecCDF(), ROL::MomentObjective< Real >::momentGradient(), ROL::MomentObjective< Real >::momentHessVec(), ROL::MomentObjective< Real >::momentValue(), ROL::SROMGenerator< Real >::pruneSamples(), and ROL::CDFObjective< Real >::valueCDF().
|
inline |
Definition at line 90 of file ROL_AtomVector.hpp.
References ROL::AtomVector< Real >::dimension_, and ROL::StdVector< Real, Element >::getVector().
Referenced by ROL::MomentObjective< Real >::gradient(), ROL::CDFObjective< Real >::gradient(), ROL::MomentObjective< Real >::hessVec(), and ROL::CDFObjective< Real >::hessVec().
|
inline |
Definition at line 103 of file ROL_AtomVector.hpp.
References ROL::AtomVector< Real >::numMySamples_.
Referenced by ROL::MomentObjective< Real >::gradient(), ROL::CDFObjective< Real >::gradient(), ROL::MomentObjective< Real >::hessVec(), and ROL::CDFObjective< Real >::hessVec().
|
inline |
Definition at line 107 of file ROL_AtomVector.hpp.
References ROL::AtomVector< Real >::dimension_.
|
private |
Definition at line 67 of file ROL_AtomVector.hpp.
Referenced by ROL::PrimalAtomVector< Real >::dot(), ROL::DualAtomVector< Real >::dot(), ROL::PrimalAtomVector< Real >::dual(), ROL::DualAtomVector< Real >::dual(), ROL::AtomVector< Real >::getNumMyAtoms(), ROL::PrimalAtomVector< Real >::reduce(), and ROL::DualAtomVector< Real >::reduce().
|
private |
Definition at line 68 of file ROL_AtomVector.hpp.
Referenced by ROL::PrimalAtomVector< Real >::dot(), ROL::DualAtomVector< Real >::dot(), ROL::PrimalAtomVector< Real >::dual(), ROL::DualAtomVector< Real >::dual(), ROL::AtomVector< Real >::getAtom(), ROL::AtomVector< Real >::getDimension(), ROL::PrimalAtomVector< Real >::reduce(), ROL::DualAtomVector< Real >::reduce(), and ROL::AtomVector< Real >::setAtom().