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

#include <ROL_SimulatedVector.hpp>

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

Public Member Functions

 DualSimulatedVector (const std::vector< Teuchos::RCP< Vector< Real > > > &vecs, const Teuchos::RCP< BatchManager< Real > > &bman, const Teuchos::RCP< SampleGenerator< Real > > &sampler)
 
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...
 
- Public Member Functions inherited from ROL::SimulatedVector< Real >
 SimulatedVector (const std::vector< RCPV > &vecs, const RCPBM &bman)
 
void set (const V &x)
 Set \(y \leftarrow x\) where \(y = \mathtt{*this}\). More...
 
void plus (const V &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 V &x)
 Compute \(y \leftarrow \alpha x + y\) where \(y = \mathtt{*this}\). More...
 
Real norm () const
 Returns \( \| y \| \) where \(y = \mathtt{*this}\). More...
 
RCPV basis (const int i) const
 Return i-th basis vector. More...
 
int dimension () const
 Return dimension of the vector space. More...
 
void zero ()
 Set to zero vector. More...
 
void applyUnary (const Elementwise::UnaryFunction< Real > &f)
 
void applyBinary (const Elementwise::BinaryFunction< Real > &f, const V &x)
 
Real reduce (const Elementwise::ReductionOp< Real > &r) const
 
Teuchos::RCP< const Vector< Real > > get (size_type i) const
 
Teuchos::RCP< Vector< Real > > get (size_type i)
 
void set (size_type i, const V &x)
 
void zero (size_type i)
 
size_type numVectors () const
 
- Public Member Functions inherited from ROL::Vector< Real >
virtual ~Vector ()
 
virtual void print (std::ostream &outStream) 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

const std::vector< Teuchos::RCP< Vector< Real > > > vecs_
 
const Teuchos::RCP< BatchManager< Real > > bman_
 
const Teuchos::RCP< SampleGenerator< Real > > sampler_
 
std::vector< Teuchos::RCP< Vector< Real > > > primal_vecs_
 
Teuchos::RCP< PrimalSimulatedVector< Real > > primal_pvec_
 
bool isPrimalInitialized_
 

Additional Inherited Members

- Public Types inherited from ROL::SimulatedVector< Real >
typedef std::vector< PV >::size_type size_type
 

Detailed Description

template<class Real>
class ROL::DualSimulatedVector< Real >

Definition at line 65 of file ROL_SimulatedVector.hpp.

Constructor & Destructor Documentation

◆ DualSimulatedVector()

template<class Real >
ROL::DualSimulatedVector< Real >::DualSimulatedVector ( const std::vector< Teuchos::RCP< Vector< Real > > > &  vecs,
const Teuchos::RCP< BatchManager< Real > > &  bman,
const Teuchos::RCP< SampleGenerator< Real > > &  sampler 
)
inline

Member Function Documentation

◆ dot()

template<class Real >
Real ROL::DualSimulatedVector< 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::SimulatedVector< Real >.

Definition at line 380 of file ROL_SimulatedVector.hpp.

References ROL::SimulatedVector< Real >::get(), and ROL::SimulatedVector< Real >::numVectors().

◆ clone()

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

Definition at line 404 of file ROL_SimulatedVector.hpp.

References ROL::SimulatedVector< Real >::clone().

◆ dual()

template<class Real >
const Vector<Real>& ROL::DualSimulatedVector< 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::SimulatedVector< Real >.

Definition at line 412 of file ROL_SimulatedVector.hpp.

References ROL::SimulatedVector< Real >::dual().

Member Data Documentation

◆ vecs_

template<class Real >
const std::vector<Teuchos::RCP<Vector<Real> > > ROL::DualSimulatedVector< Real >::vecs_
private

Definition at line 362 of file ROL_SimulatedVector.hpp.

◆ bman_

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

Definition at line 363 of file ROL_SimulatedVector.hpp.

◆ sampler_

template<class Real >
const Teuchos::RCP<SampleGenerator<Real> > ROL::DualSimulatedVector< Real >::sampler_
private

Definition at line 364 of file ROL_SimulatedVector.hpp.

◆ primal_vecs_

template<class Real >
std::vector<Teuchos::RCP<Vector<Real> > > ROL::DualSimulatedVector< Real >::primal_vecs_
mutableprivate

Definition at line 365 of file ROL_SimulatedVector.hpp.

◆ primal_pvec_

template<class Real >
Teuchos::RCP<PrimalSimulatedVector<Real> > ROL::DualSimulatedVector< Real >::primal_pvec_
mutableprivate

Definition at line 366 of file ROL_SimulatedVector.hpp.

◆ isPrimalInitialized_

template<class Real >
bool ROL::DualSimulatedVector< Real >::isPrimalInitialized_
mutableprivate

Definition at line 367 of file ROL_SimulatedVector.hpp.


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