MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbstractLinAlgPack_MatrixZero.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
5 // Copyright (2003) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef ALAP_MATRIX_ZERO_H
43 #define ALAP_MATRIX_ZERO_H
44 
47 
48 namespace AbstractLinAlgPack {
49 
56 class MatrixZero : public MatrixOp {
57 public:
58 
61 
63  MatrixZero(
66  );
67 
82  void initialize(
85  );
86 
88 
92  size_type rows() const;
94  size_type cols() const;
96  size_type nz() const;
98 
101 
103  const VectorSpace& space_cols() const;
105  const VectorSpace& space_rows() const;
107  void zero_out();
109  void Mt_S(value_type alpha);
111  MatrixOp& operator=(const MatrixOp& M);
113  std::ostream& output(std::ostream& out) const;
115  bool Mp_StM(
116  MatrixOp* mwo_lhs, value_type alpha
117  ,BLAS_Cpp::Transp trans_rhs
118  ) const;
120  bool Mp_StMtP(
121  MatrixOp* mwo_lhs, value_type alpha
122  ,BLAS_Cpp::Transp M_trans
123  ,const GenPermMatrixSlice& P_rhs, BLAS_Cpp::Transp P_rhs_trans
124  ) const;
126  bool Mp_StPtM(
127  MatrixOp* mwo_lhs, value_type alpha
128  ,const GenPermMatrixSlice& P_rhs, BLAS_Cpp::Transp P_rhs_trans
129  ,BLAS_Cpp::Transp M_trans
130  ) const;
132  bool Mp_StPtMtP(
133  MatrixOp* mwo_lhs, value_type alpha
134  ,const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
135  ,BLAS_Cpp::Transp M_trans
136  ,const GenPermMatrixSlice& P_rhs2, BLAS_Cpp::Transp P_rhs2_trans
137  ) const;
139  void Vp_StMtV(
140  VectorMutable* vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
141  ,const Vector& v_rhs2, value_type beta) const;
143  void Vp_StMtV(
144  VectorMutable* vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
145  ,const SpVectorSlice& sv_rhs2, value_type beta) const;
147  void Vp_StPtMtV(
148  VectorMutable* vs_lhs, value_type alpha
149  ,const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
150  ,BLAS_Cpp::Transp M_rhs2_trans
151  ,const Vector& v_rhs3, value_type beta) const;
153  void Vp_StPtMtV(
154  VectorMutable* vs_lhs, value_type alpha
155  ,const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
156  ,BLAS_Cpp::Transp M_rhs2_trans
157  ,const SpVectorSlice& sv_rhs3, value_type beta) const;
160  const Vector& v_rhs1, BLAS_Cpp::Transp trans_rhs2
161  ,const Vector& v_rhs3) const;
164  const SpVectorSlice& sv_rhs1, BLAS_Cpp::Transp trans_rhs2
165  , const SpVectorSlice& sv_rhs3) const;
167  void syr2k(
168  BLAS_Cpp::Transp M_trans, value_type alpha
169  ,const GenPermMatrixSlice& P1, BLAS_Cpp::Transp P1_trans
170  ,const GenPermMatrixSlice& P2, BLAS_Cpp::Transp P2_trans
171  ,value_type beta, MatrixSymOp* symwo_lhs ) const;
173  bool Mp_StMtM(
174  MatrixOp* mwo_lhs, value_type alpha
175  ,BLAS_Cpp::Transp trans_rhs1
176  ,const MatrixOp& mwo_rhs2, BLAS_Cpp::Transp trans_rhs2
177  ,value_type beta ) const;
179  bool Mp_StMtM(
180  MatrixOp* mwo_lhs, value_type alpha
181  ,const MatrixOp& mwo_rhs1, BLAS_Cpp::Transp trans_rhs1
182  ,BLAS_Cpp::Transp trans_rhs2
183  ,value_type beta ) const;
185  bool syrk(
186  BLAS_Cpp::Transp M_trans, value_type alpha
187  ,value_type beta, MatrixSymOp* sym_lhs ) const;
188 
190 
191 private:
192 
195 
196  //
197  void assert_initialized() const;
198 
199 }; // end class MatrixZero
200 
201 } // end namespace AbstractLinAlgPack
202 
203 #endif // ALAP_MATRIX_ZERO_H
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
void syr2k(BLAS_Cpp::Transp M_trans, value_type alpha, const GenPermMatrixSlice &P1, BLAS_Cpp::Transp P1_trans, const GenPermMatrixSlice &P2, BLAS_Cpp::Transp P2_trans, value_type beta, MatrixSymOp *symwo_lhs) const
void initialize(const VectorSpace::space_ptr_t &space_cols, const VectorSpace::space_ptr_t &space_rows)
Initialize (or initialize) given the columns and rows vector spaces.
value_type transVtMtV(const Vector &v_rhs1, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3) const
Interface adding operations specific for a symmetric matrix {abstract}.
Implementation of a matrix with all zeros.
std::ostream & output(std::ostream &out) const
Abstract interface for objects that represent a space for mutable coordinate vectors.
void Vp_StPtMtV(VectorMutable *vs_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_rhs2_trans, const Vector &v_rhs3, value_type beta) const
std::ostream * out
const LAPACK_C_Decl::f_int & M
void Vp_StMtV(VectorMutable *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const
Base class for all matrices that support basic matrix operations.
bool Mp_StM(MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const
bool Mp_StPtMtP(MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs1, BLAS_Cpp::Transp P_rhs1_trans, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs2, BLAS_Cpp::Transp P_rhs2_trans) const
Abstract interface for mutable coordinate vectors {abstract}.
MatrixZero(const VectorSpace::space_ptr_t &space_cols=Teuchos::null, const VectorSpace::space_ptr_t &space_rows=Teuchos::null)
Calls this->initalize()
bool syrk(BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs) const
bool Mp_StMtP(MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp M_trans, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans) const
bool Mp_StMtM(MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2, value_type beta) const
Transp
TRANS.
Concrete matrix type to represent general permutation (mapping) matrices.
bool Mp_StPtM(MatrixOp *mwo_lhs, value_type alpha, const GenPermMatrixSlice &P_rhs, BLAS_Cpp::Transp P_rhs_trans, BLAS_Cpp::Transp M_trans) const