51 #ifndef ROL_MULTIVECTOR_HPP 52 #define ROL_MULTIVECTOR_HPP 57 #include "Teuchos_ArrayRCP.hpp" 58 #include "Teuchos_SerialDenseMatrix.hpp" 66 typedef Teuchos::RCP<V>
PV;
67 typedef Teuchos::ArrayRCP<PV>
APV;
69 typedef Teuchos::RCP<MV>
PMV;
79 virtual PMV
clone()
const = 0;
85 virtual PMV
clone(
const int numvecs )
const = 0;
100 virtual PMV
deepCopy(
const std::vector<int> &index)
const = 0;
108 virtual PMV
shallowCopy(
const std::vector<int> &index) = 0;
116 virtual const PMV
shallowCopyConst(
const std::vector<int> &index)
const = 0;
139 virtual void gemm(
const Real alpha,
141 const Teuchos::SerialDenseMatrix<int,Real> &B,
142 const Real beta) = 0;
149 virtual void axpy(
const Real alpha,
const MV& x) = 0;
156 virtual void scale(
const Real alpha) = 0;
163 virtual void scale(
const std::vector<Real> &alpha) = 0;
169 virtual void set(
const MV &A) = 0;
176 virtual void set(
const MV &A,
const std::vector<int> &index) = 0;
187 Teuchos::SerialDenseMatrix<int,Real> &B)
const = 0;
195 virtual void dots(
const MV &A,
196 std::vector<Real> &b)
const = 0;
203 virtual void norms(std::vector<Real> &normvec)
const = 0;
208 virtual void zero() = 0;
virtual PMV shallowCopy(const std::vector< int > &index)=0
Make a shallow copy of this MultiVector.
virtual void scale(const Real alpha)=0
Scale the MultiVector by a single scalar alpha .
virtual void norms(std::vector< Real > &normvec) const =0
Compute the norm of each vector in the MultiVector.
virtual ptrdiff_t getLength() const =0
Get the number of elements of a vector in the MultiVector.
Defines the linear algebra or vector space interface.
virtual void innerProducts(const Real alpha, const MV &A, Teuchos::SerialDenseMatrix< int, Real > &B) const =0
Compute .
virtual void dots(const MV &A, std::vector< Real > &b) const =0
Compute dot products of pairs of vectors.
virtual void axpy(const Real alpha, const MV &x)=0
Perform the axpy operation columnwise on the MultiVector where is this MultiVector.
virtual void zero()=0
Zero each of the vectors in the MultiVector.
Teuchos::ArrayRCP< PV > APV
virtual PMV clone() const =0
Make a new MultiVector of the same dimensions.
virtual PV getVector(int i) const =0
Return a pointer to the ith vector.
virtual int getNumberOfVectors() const =0
Get the number of vectors in the MultiVector.
Provides a container and operations on multiple ROL vectors for use with other Trilinos packages whic...
virtual PMV deepCopy() const =0
Make a deep copy of this MultiVector.
virtual const PMV shallowCopyConst(const std::vector< int > &index) const =0
Make a shallow copy of this MultiVector.
virtual void gemm(const Real alpha, const MV &A, const Teuchos::SerialDenseMatrix< int, Real > &B, const Real beta)=0
Generic BLAS level 3 matrix multiplication .