RTOp Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RTOpPack_TOpLinearCombination_decl.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // RTOp: Interfaces and Support Software for Vector Reduction Transformation
4 // Operations
5 //
6 // Copyright 2006 NTESS and the RTOp contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef RTOPPACK_TOP_LINEAR_COMBINATION_DECL_HPP
12 #define RTOPPACK_TOP_LINEAR_COMBINATION_DECL_HPP
13 
14 #include "RTOpPack_RTOpTHelpers.hpp"
15 #include "Teuchos_Workspace.hpp"
16 
17 
18 namespace RTOpPack {
19 
20 
31 template<class Scalar>
32 class TOpLinearCombination : public RTOpT<Scalar> {
33 public:
34 
37  const ArrayView<const Scalar> &alpha_in = Teuchos::null,
39  );
40 
42  void alpha( const ArrayView<const Scalar> &alpha_in );
43 
45  const ArrayView<const Scalar> alpha() const;
46 
48  void beta( const Scalar& beta_in );
49 
51  Scalar beta() const;
52 
54  int num_vecs() const;
55 
58 
60  void apply_op_impl(
61  const ArrayView<const ConstSubVectorView<Scalar> > &sub_vecs,
62  const ArrayView<const SubVectorView<Scalar> > &targ_sub_vecs,
63  const Ptr<ReductTarget> &reduct_obj_inout
64  ) const;
65 
67 
68 private:
69 
70  Scalar beta_;
72 
73 };
74 
75 
76 } // namespace RTOpPack
77 
78 
79 #endif // RTOPPACK_TOP_LINEAR_COMBINATION_DECL_HPP
Linear combination transformation operator: z0[i] = beta*z0[i].
Class for a changeable sub-vector.
Class for a non-changeable sub-vector.
Templated interface to vector reduction/transformation operators {abstract}.
void apply_op_impl(const ArrayView< const ConstSubVectorView< Scalar > > &sub_vecs, const ArrayView< const SubVectorView< Scalar > > &targ_sub_vecs, const Ptr< ReductTarget > &reduct_obj_inout) const
const ArrayView< const Scalar > alpha() const
TOpLinearCombination(const ArrayView< const Scalar > &alpha_in=Teuchos::null, const Scalar &beta=Teuchos::ScalarTraits< Scalar >::zero())