ROL
Public Member Functions | Private Types | Private Attributes | List of all members
ROL::PrimalAtomVector< Real > Class Template Reference

#include <ROL_AtomVector.hpp>

+ Inheritance diagram for ROL::PrimalAtomVector< Real >:

Public Member Functions

 PrimalAtomVector (const ROL::Ptr< std::vector< Real > > &vec, const ROL::Ptr< BatchManager< Real > > &bman, const int numMySamples, const int dimension, const ROL::Ptr< std::vector< Real > > &scale)
 
Real dot (const Vector< Real > &x) const
 Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More...
 
ROL::Ptr< Vector< Real > > clone (void) const
 Clone to make a new (uninitialized) vector. More...
 
const Vector< Real > & dual (void) 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...
 
- Public Member Functions inherited from ROL::AtomVector< Real >
 AtomVector (const ROL::Ptr< std::vector< Real > > &vec, const ROL::Ptr< BatchManager< Real > > &bman, const int numMySamples, const int dimension)
 
ROL::Ptr< 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
 
- Public Member Functions inherited from ROL::BatchStdVector< Real >
 BatchStdVector (const ROL::Ptr< std::vector< Real > > &vec, const ROL::Ptr< BatchManager< Real > > &bman)
 
int dimension (void) const
 Return dimension of the vector space. More...
 
Real reduce (const Elementwise::ReductionOp< Real > &r) const
 
- Public Member Functions inherited from ROL::StdVector< Real >
 StdVector (const Ptr< std::vector< Real > > &std_vec)
 
 StdVector (const int dim, const Realval=0.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 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...
 
Real norm () const
 Returns \( \| y \| \) where \(y = \mathtt{*this}\). More...
 
Ptr< const std::vector< Real > > getVector () const
 
Ptr< std::vector< Real > > getVector ()
 
Ptr< 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
 
void setScalar (const Real C)
 Set \(y \leftarrow C\) where \(C\in\mathbb{R}\). More...
 
void randomize (const Real l=0.0, const Real u=1.0)
 Set vector to be uniform random between [l,u]. More...
 
virtual void print (std::ostream &outStream) const
 
- Public Member Functions inherited from ROL::Vector< Real >
virtual ~Vector ()
 
virtual void zero ()
 Set to zero vector. 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 ROL::Ptr< std::vector
< Real > > 
scale_
 
ROL::Ptr< DualAtomVector< Real > > dual_vec_
 
bool isDualInitialized_
 

Additional Inherited Members

- Protected Member Functions inherited from ROL::BatchStdVector< Real >
const ROL::Ptr< BatchManager
< Real > > 
getBatchManager (void) const
 

Detailed Description

template<class Real>
class ROL::PrimalAtomVector< Real >

Definition at line 57 of file ROL_AtomVector.hpp.

Member Typedef Documentation

template<class Real >
typedef std::vector<Real>::size_type ROL::PrimalAtomVector< Real >::uint
private

Definition at line 109 of file ROL_AtomVector.hpp.

Constructor & Destructor Documentation

template<class Real >
ROL::PrimalAtomVector< Real >::PrimalAtomVector ( const ROL::Ptr< std::vector< Real > > &  vec,
const ROL::Ptr< BatchManager< Real > > &  bman,
const int  numMySamples,
const int  dimension,
const ROL::Ptr< std::vector< Real > > &  scale 
)
inline

Definition at line 116 of file ROL_AtomVector.hpp.

Member Function Documentation

template<class Real >
Real ROL::PrimalAtomVector< Real >::dot ( const Vector< Real > &  x) const
inlinevirtual

Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).

Parameters
[in]xis the vector that forms the dot product with \(\mathtt{*this}\).
Returns
The number equal to \(\langle \mathtt{*this}, x \rangle\).

Reimplemented from ROL::BatchStdVector< Real >.

Definition at line 123 of file ROL_AtomVector.hpp.

References ROL::BatchStdVector< Real >::dimension(), ROL::BatchStdVector< Real >::getBatchManager(), ROL::AtomVector< Real >::getDimension(), ROL::AtomVector< Real >::getNumMyAtoms(), ROL::StdVector< Real >::getVector(), and ROL::StdVector< Real, Element >::getVector().

template<class Real >
ROL::Ptr<Vector<Real> > ROL::PrimalAtomVector< Real >::clone ( void  ) const
inlinevirtual

Clone to make a new (uninitialized) vector.

Returns
A reference-counted pointer to the cloned vector.

Provides the means of allocating temporary memory in ROL.


Reimplemented from ROL::BatchStdVector< Real >.

Definition at line 144 of file ROL_AtomVector.hpp.

References ROL::BatchStdVector< Real >::dimension(), ROL::AtomVector< Real >::getDimension(), ROL::AtomVector< Real >::getNumMyAtoms(), and ROL::PrimalAtomVector< Real >::scale_.

template<class Real >
const Vector<Real>& ROL::PrimalAtomVector< Real >::dual ( void  ) const
inlinevirtual

Return dual representation of \(\mathtt{*this}\), for example, the result of applying a Riesz map, or change of basis, or change of memory layout.

Returns
A const reference to dual representation.

By default, returns the current object. Please overload if you need a dual representation.


Reimplemented from ROL::Vector< Real >.

Definition at line 153 of file ROL_AtomVector.hpp.

References ROL::BatchStdVector< Real >::dimension(), ROL::PrimalAtomVector< Real >::dual_vec_, ROL::AtomVector< Real >::getDimension(), ROL::AtomVector< Real >::getNumMyAtoms(), ROL::StdVector< Real, Element >::getVector(), ROL::PrimalAtomVector< Real >::isDualInitialized_, and ROL::PrimalAtomVector< Real >::scale_.

Member Data Documentation

template<class Real >
const ROL::Ptr<std::vector<Real> > ROL::PrimalAtomVector< Real >::scale_
private
template<class Real >
ROL::Ptr<DualAtomVector<Real> > ROL::PrimalAtomVector< Real >::dual_vec_
mutableprivate

Definition at line 112 of file ROL_AtomVector.hpp.

Referenced by ROL::PrimalAtomVector< Real >::dual().

template<class Real >
bool ROL::PrimalAtomVector< Real >::isDualInitialized_
mutableprivate

Definition at line 113 of file ROL_AtomVector.hpp.

Referenced by ROL::PrimalAtomVector< Real >::dual().


The documentation for this class was generated from the following file: