44 #ifndef ROL_SCALEDSTDVECTOR_H 45 #define ROL_SCALEDSTDVECTOR_H 61 template <
class Real,
class Element=Real>
64 template <
class Real,
class Element=Real>
67 template <
class Real,
class Element>
70 typedef typename std::vector<Element>::size_type
uint;
75 mutable Teuchos::RCP<DualScaledStdVector<Real> >
dual_vec_;
81 const Teuchos::RCP<std::vector<Element> > & scaling_vec) :
87 const std::vector<Element>& xval = *ex.
getVector();
92 val += yval[i]*xval[i]*(*scaling_vec_)[i];
97 Teuchos::RCP<Vector<Real> >
clone()
const {
107 Teuchos::rcp(
new std::vector<Element>(n)),
111 for (
uint i = 0; i < n; i++) {
122 template <
class Real,
class Element>
123 class DualScaledStdVector :
public StdVector<Real> {
125 typedef typename std::vector<Element>::size_type
uint;
136 const Teuchos::RCP<std::vector<Element> > & scaling_vec) :
142 const std::vector<Element>& xval = *ex.getVector();
147 val += yval[i]*xval[i]/(*scaling_vec_)[i];
152 Teuchos::RCP<Vector<Real> >
clone()
const {
162 Teuchos::rcp(
new std::vector<Element>(n)),
166 for (
uint i = 0; i < n; i++) {
std::vector< Element >::size_type uint
Teuchos::RCP< PrimalScaledStdVector< Real > > primal_vec_
const ROL::Vector< Real > & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
Provides the std::vector implementation of the ROL::Vector interface that handles scalings in the inn...
PrimalScaledStdVector(const Teuchos::RCP< std::vector< Element > > &std_vec, const Teuchos::RCP< std::vector< Element > > &scaling_vec)
Teuchos::RCP< Vector< Real > > clone() const
Clone to make a new (uninitialized) vector.
std::vector< Element >::size_type uint
const ROL::Vector< Real > & dual() const
Return dual representation of , for example, the result of applying a Riesz map, or change of basis...
Defines the linear algebra or vector space interface.
Provides the std::vector implementation of the ROL::Vector interface.
Teuchos::RCP< DualScaledStdVector< Real > > dual_vec_
Real dot(const Vector< Real > &x) const
Compute where .
Teuchos::RCP< Vector< Real > > clone() const
Clone to make a new (uninitialized) vector.
Teuchos::RCP< const std::vector< Element > > getVector() const
DualScaledStdVector(const Teuchos::RCP< std::vector< Element > > &std_vec, const Teuchos::RCP< std::vector< Element > > &scaling_vec)
Provides the std::vector implementation of the ROL::Vector interface that handles scalings in the inn...
Teuchos::RCP< std::vector< Element > > scaling_vec_
Real dot(const Vector< Real > &x) const
Compute where .
Teuchos::RCP< std::vector< Element > > scaling_vec_