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

#include <ROL_AtomVector.hpp>

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

Public Member Functions

 DualAtomVector (const Teuchos::RCP< std::vector< Real > > &vec, const int numMySamples, const int dimension, const Teuchos::RCP< std::vector< Real > > &scale, const Teuchos::RCP< BatchManager< Real > > &bman)
 
Real dot (const Vector< Real > &x) const
 Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\). More...
 
Teuchos::RCP< 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...
 
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::AtomVector< Real >
 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
 
- Public Member Functions inherited from ROL::StdVector< Real >
 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...
 
Real norm () const
 Returns \( \| y \| \) where \(y = \mathtt{*this}\). 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
 
- 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 uint numMySamples_
 
const uint dimension_
 
const Teuchos::RCP< std::vector< Real > > scale_
 
const Teuchos::RCP< BatchManager< Real > > bman_
 
Teuchos::RCP< PrimalAtomVector< Real > > dual_vec_
 

Detailed Description

template<class Real>
class ROL::DualAtomVector< Real >

Definition at line 61 of file ROL_AtomVector.hpp.

Member Typedef Documentation

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

Definition at line 199 of file ROL_AtomVector.hpp.

Constructor & Destructor Documentation

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

Definition at line 209 of file ROL_AtomVector.hpp.

Member Function Documentation

template<class Real>
Real ROL::DualAtomVector< 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::StdVector< Real >.

Definition at line 218 of file ROL_AtomVector.hpp.

References ROL::AtomVector< Real >::dimension_, ROL::StdVector< Real, Element >::getVector(), ROL::StdVector< Real >::getVector(), and ROL::AtomVector< Real >::numMySamples_.

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::DualAtomVector< 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::StdVector< Real >.

Definition at line 236 of file ROL_AtomVector.hpp.

template<class Real>
const Vector<Real>& ROL::DualAtomVector< 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 242 of file ROL_AtomVector.hpp.

References ROL::AtomVector< Real >::dimension_, ROL::StdVector< Real, Element >::getVector(), and ROL::AtomVector< Real >::numMySamples_.

template<class Real>
int ROL::DualAtomVector< Real >::dimension ( void  ) const
inlinevirtual

Return dimension of the vector space.

Returns
The dimension of the vector space, i.e., the total number of basis vectors.

Overload if the basis is overloaded.


Reimplemented from ROL::Vector< Real >.

Definition at line 258 of file ROL_AtomVector.hpp.

template<class Real>
Real ROL::DualAtomVector< Real >::reduce ( const Elementwise::ReductionOp< Real > &  r) const
inlinevirtual

Member Data Documentation

template<class Real>
const uint ROL::DualAtomVector< Real >::numMySamples_
private

Definition at line 201 of file ROL_AtomVector.hpp.

template<class Real>
const uint ROL::DualAtomVector< Real >::dimension_
private

Definition at line 202 of file ROL_AtomVector.hpp.

template<class Real>
const Teuchos::RCP<std::vector<Real> > ROL::DualAtomVector< Real >::scale_
private

Definition at line 203 of file ROL_AtomVector.hpp.

template<class Real>
const Teuchos::RCP<BatchManager<Real> > ROL::DualAtomVector< Real >::bman_
private

Definition at line 204 of file ROL_AtomVector.hpp.

template<class Real>
Teuchos::RCP<PrimalAtomVector<Real> > ROL::DualAtomVector< Real >::dual_vec_
mutableprivate

Definition at line 206 of file ROL_AtomVector.hpp.


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