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

#include <ROL_ProbabilityVector.hpp>

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

Public Member Functions

 DualProbabilityVector (const Teuchos::RCP< std::vector< Real > > &vec, 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::ProbabilityVector< Real >
 ProbabilityVector (const Teuchos::RCP< std::vector< Real > > &vec)
 
const Real getProbability (const int i) const
 
void setProbability (const int i, const Real wt)
 
int getNumMyAtoms (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

uint numMySamples_
 
Teuchos::RCP< std::vector< Real > > scale_
 
Teuchos::RCP< BatchManager< Real > > bman_
 
Teuchos::RCP< PrimalProbabilityVector< Real > > dual_vec_
 

Detailed Description

template<class Real>
class ROL::DualProbabilityVector< Real >

Definition at line 61 of file ROL_ProbabilityVector.hpp.

Member Typedef Documentation

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

Definition at line 170 of file ROL_ProbabilityVector.hpp.

Constructor & Destructor Documentation

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

Definition at line 179 of file ROL_ProbabilityVector.hpp.

Member Function Documentation

template<class Real>
Real ROL::DualProbabilityVector< 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 185 of file ROL_ProbabilityVector.hpp.

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

template<class Real>
Teuchos::RCP<Vector<Real> > ROL::DualProbabilityVector< 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 199 of file ROL_ProbabilityVector.hpp.

template<class Real>
const Vector<Real>& ROL::DualProbabilityVector< 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 204 of file ROL_ProbabilityVector.hpp.

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

template<class Real>
int ROL::DualProbabilityVector< 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 215 of file ROL_ProbabilityVector.hpp.

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

Member Data Documentation

template<class Real>
uint ROL::DualProbabilityVector< Real >::numMySamples_
private

Definition at line 172 of file ROL_ProbabilityVector.hpp.

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

Definition at line 173 of file ROL_ProbabilityVector.hpp.

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

Definition at line 174 of file ROL_ProbabilityVector.hpp.

template<class Real>
Teuchos::RCP<PrimalProbabilityVector<Real> > ROL::DualProbabilityVector< Real >::dual_vec_
mutableprivate

Definition at line 176 of file ROL_ProbabilityVector.hpp.


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