ROL
|
#include <ROL_ProbabilityVector.hpp>
Public Member Functions | |
PrimalProbabilityVector (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 |
![]() | |
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 |
![]() | |
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 |
![]() | |
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< DualProbabilityVector< Real > > | dual_vec_ |
Definition at line 58 of file ROL_ProbabilityVector.hpp.
|
private |
Definition at line 103 of file ROL_ProbabilityVector.hpp.
|
inline |
Definition at line 112 of file ROL_ProbabilityVector.hpp.
|
inlinevirtual |
Compute \( \langle y,x \rangle \) where \(y = \mathtt{*this}\).
[in] | x | is the vector that forms the dot product with \(\mathtt{*this}\). |
Reimplemented from ROL::StdVector< Real >.
Definition at line 118 of file ROL_ProbabilityVector.hpp.
References ROL::StdVector< Real >::getVector(), ROL::StdVector< Real, Element >::getVector(), and ROL::ProbabilityVector< Real >::numMySamples_.
|
inlinevirtual |
Clone to make a new (uninitialized) vector.
Provides the means of allocating temporary memory in ROL.
Reimplemented from ROL::StdVector< Real >.
Definition at line 132 of file ROL_ProbabilityVector.hpp.
|
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.
By default, returns the current object. Please overload if you need a dual representation.
Reimplemented from ROL::Vector< Real >.
Definition at line 137 of file ROL_ProbabilityVector.hpp.
References ROL::StdVector< Real, Element >::getVector(), and ROL::ProbabilityVector< Real >::numMySamples_.
|
inlinevirtual |
Return dimension of the vector space.
Overload if the basis is overloaded.
Reimplemented from ROL::Vector< Real >.
Definition at line 148 of file ROL_ProbabilityVector.hpp.
|
inlinevirtual |
Reimplemented from ROL::Vector< Real >.
Definition at line 155 of file ROL_ProbabilityVector.hpp.
References ROL::StdVector< Real, Element >::getVector(), and ROL::ProbabilityVector< Real >::numMySamples_.
|
private |
Definition at line 105 of file ROL_ProbabilityVector.hpp.
|
private |
Definition at line 106 of file ROL_ProbabilityVector.hpp.
|
private |
Definition at line 107 of file ROL_ProbabilityVector.hpp.
|
mutableprivate |
Definition at line 109 of file ROL_ProbabilityVector.hpp.