44 #ifndef ROL_SROMVECTOR_H 45 #define ROL_SROMVECTOR_H 62 typedef typename std::vector<Real>::size_type
uint;
64 const Teuchos::RCP<ProbabilityVector<Real> >
pvec_;
65 const Teuchos::RCP<AtomVector<Real> >
avec_;
93 void scale(
const Real alpha ) {
113 val = std::sqrt(
dot(*
this) );
117 Teuchos::RCP<Vector<Real> >
clone(
void)
const {
136 return avec_->dimension() +
pvec_->dimension();
139 void applyUnary(
const Elementwise::UnaryFunction<Real> &f ) {
140 pvec_->applyUnary(f);
141 avec_->applyUnary(f);
150 Real
reduce(
const Elementwise::ReductionOp<Real> &r )
const {
151 Real result = r.initialValue();
152 Real pval =
pvec_->reduce(r);
153 Real aval =
avec_->reduce(r);
154 r.reduce(pval,result);
155 r.reduce(aval,result);
void axpy(const Real alpha, const Vector< Real > &x)
Compute where .
const Teuchos::RCP< const ProbabilityVector< Real > > getProbabilityVector(void) const
const Teuchos::RCP< AtomVector< Real > > avec_
Provides the std::vector implementation of the ROL::Vector interface.
const Vector< Real > & dual(void) const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
void applyUnary(const Elementwise::UnaryFunction< Real > &f)
void plus(const Vector< Real > &x)
Compute , where .
Real dot(const Vector< Real > &x) const
Compute where .
Defines the linear algebra or vector space interface.
void applyBinary(const Elementwise::BinaryFunction< Real > &f, const Vector< Real > &x)
Teuchos::RCP< AtomVector< Real > > getAtomVector(void)
int dimension(void) const
Return dimension of the vector space.
const Teuchos::RCP< ProbabilityVector< Real > > pvec_
Provides the std::vector implementation of the ROL::Vector interface.
Real norm() const
Returns where .
Teuchos::RCP< ProbabilityVector< Real > > getProbabilityVector(void)
Provides the std::vector implementation of the ROL::Vector interface.
Real reduce(const Elementwise::ReductionOp< Real > &r) const
const Teuchos::RCP< const AtomVector< Real > > getAtomVector(void) const
Teuchos::RCP< SROMVector< Real > > dual_vec_
void setProbabilityVector(const ProbabilityVector< Real > &vec)
Teuchos::RCP< Vector< Real > > dual_pvec_
Teuchos::RCP< Vector< Real > > clone(void) const
Clone to make a new (uninitialized) vector.
void scale(const Real alpha)
Compute where .
void setAtomVector(const AtomVector< Real > &vec)
Teuchos::RCP< Vector< Real > > dual_avec_
SROMVector(const Teuchos::RCP< ProbabilityVector< Real > > &pvec, const Teuchos::RCP< AtomVector< Real > > &avec)
std::vector< Real >::size_type uint