MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbstractLinAlgPack_MatrixOpNonsingAggr.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 MATRIX_WITH_OP_NONSINGULAR_AGGR_H
43 #define MATRIX_WITH_OP_NONSINGULAR_AGGR_H
44 
46 
47 namespace AbstractLinAlgPack {
48 
55  : virtual public MatrixOpNonsing
56 {
57 public:
58 
61 
66 
68 
71 
74 
78  const mwo_ptr_t &mwo
80  ,const mns_ptr_t &mns
82  );
83 
88  void initialize(
89  const mwo_ptr_t &mwo
91  ,const mns_ptr_t &mns
93  );
94 
99  void set_uninitialized();
100 
102 
105 
107  const mwo_ptr_t& mwo() const;
109  BLAS_Cpp::Transp mwo_trans() const;
111  const mns_ptr_t& mns() const;
113  BLAS_Cpp::Transp mns_trans() const;
114 
116 
119 
121  size_type rows() const;
123  size_type cols() const;
125  size_type nz() const;
126 
128 
131 
133  const VectorSpace& space_cols() const;
135  const VectorSpace& space_rows() const;
137  MatrixOp::mat_ptr_t sub_view(const Range1D& row_rng, const Range1D& col_rng) const;
139  MatrixOp& operator=(const MatrixOp& M);
141  std::ostream& output(std::ostream& out) const;
142 
143 protected:
144 
146  bool Mp_StM(
147  MatrixOp* mwo_lhs, value_type alpha
148  , BLAS_Cpp::Transp trans_rhs) const;
150  bool Mp_StMtP(
151  MatrixOp* mwo_lhs, value_type alpha
152  , BLAS_Cpp::Transp M_trans
153  , const GenPermMatrixSlice& P_rhs, BLAS_Cpp::Transp P_rhs_trans
154  ) const;
156  bool Mp_StPtM(
157  MatrixOp* mwo_lhs, value_type alpha
158  , const GenPermMatrixSlice& P_rhs, BLAS_Cpp::Transp P_rhs_trans
159  , BLAS_Cpp::Transp M_trans
160  ) const;
162  bool Mp_StPtMtP(
163  MatrixOp* mwo_lhs, value_type alpha
164  ,const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
165  ,BLAS_Cpp::Transp M_trans
166  ,const GenPermMatrixSlice& P_rhs2, BLAS_Cpp::Transp P_rhs2_trans
167  ) const;
169  void Vp_StMtV(
170  VectorMutable* vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
171  , const Vector& v_rhs2, value_type beta) const;
173  void Vp_StMtV(
174  VectorMutable* vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1
175  , const SpVectorSlice& sv_rhs2, value_type beta) const;
177  void Vp_StPtMtV(
178  VectorMutable* vs_lhs, value_type alpha
179  , const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
180  , BLAS_Cpp::Transp M_rhs2_trans
181  , const Vector& v_rhs3, value_type beta) const;
183  void Vp_StPtMtV(
184  VectorMutable* vs_lhs, value_type alpha
185  , const GenPermMatrixSlice& P_rhs1, BLAS_Cpp::Transp P_rhs1_trans
186  , BLAS_Cpp::Transp M_rhs2_trans
187  , const SpVectorSlice& sv_rhs3, value_type beta) const;
190  const Vector& v_rhs1, BLAS_Cpp::Transp trans_rhs2
191  , const Vector& v_rhs3) const;
194  const SpVectorSlice& sv_rhs1, BLAS_Cpp::Transp trans_rhs2
195  , const SpVectorSlice& sv_rhs3) const;
197  void syr2k(
198  BLAS_Cpp::Transp M_trans, value_type alpha
199  , const GenPermMatrixSlice& P1, BLAS_Cpp::Transp P1_trans
200  , const GenPermMatrixSlice& P2, BLAS_Cpp::Transp P2_trans
201  , value_type beta, MatrixSymOp* symwo_lhs ) const;
203  bool Mp_StMtM(
204  MatrixOp* mwo_lhs, value_type alpha
205  , BLAS_Cpp::Transp trans_rhs1, const MatrixOp& mwo_rhs2
206  , BLAS_Cpp::Transp trans_rhs2, value_type beta ) const;
208  bool Mp_StMtM(
209  MatrixOp* mwo_lhs, value_type alpha
210  , const MatrixOp& mwo_rhs1, BLAS_Cpp::Transp trans_rhs1
211  , BLAS_Cpp::Transp trans_rhs2, value_type beta ) const;
213  bool syrk(
214  BLAS_Cpp::Transp M_trans, value_type alpha
215  , value_type beta, MatrixSymOp* sym_lhs ) const;
216 
218 
221 
223  void V_InvMtV(
224  VectorMutable* v_lhs, BLAS_Cpp::Transp trans_rhs1
225  ,const Vector& v_rhs2) const;
227  void V_InvMtV(
228  VectorMutable* v_lhs, BLAS_Cpp::Transp trans_rhs1
229  , const SpVectorSlice& sv_rhs2) const;
232  const Vector& v_rhs1
233  ,BLAS_Cpp::Transp trans_rhs2, const Vector& v_rhs3) const;
236  const SpVectorSlice& sv_rhs1
237  ,BLAS_Cpp::Transp trans_rhs2, const SpVectorSlice& sv_rhs3) const;
239  void M_StInvMtM(
240  MatrixOp* m_lhs, value_type alpha
241  ,BLAS_Cpp::Transp trans_rhs1
242  ,const MatrixOp& mwo_rhs2, BLAS_Cpp::Transp trans_rhs2
243  ) const;
245  void M_StMtInvM(
246  MatrixOp* m_lhs, value_type alpha
247  ,const MatrixOp& mwo_rhs1, BLAS_Cpp::Transp trans_rhs1
248  ,BLAS_Cpp::Transp trans_rhs2
249  ) const;
250 
252 
253 private:
254 
255 #ifdef DOXYGEN_COMPILE
258 #else
259  mwo_ptr_t mwo_;
260  BLAS_Cpp::Transp mwo_trans_;
261  mns_ptr_t mns_;
262  BLAS_Cpp::Transp mns_trans_;
263 #endif
264 
265 }; // end class MatrixOpNonsingAggr
266 
267 // ////////////////////////////////////
268 // Inline members
269 
270 inline
273 {
274  return mwo_;
275 }
276 
277 inline
279 {
280  return mwo_trans_;
281 }
282 
283 inline
286 {
287  return mns_;
288 }
289 
290 inline
292 {
293  return mns_trans_;
294 }
295 
296 } // end namespace AbstractLinAlgPack
297 
298 #endif // MATRIX_WITH_OP_NONSINGULAR_AGGR_H
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 immutable, finite dimensional, coordinate vectors {abstract}.
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
void V_InvMtV(VectorMutable *v_lhs, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2) const
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
const mns_ptr_t & mns() const
void initialize(const mwo_ptr_t &mwo, BLAS_Cpp::Transp mwo_trans, const mns_ptr_t &mns, BLAS_Cpp::Transp mns_trans)
Initialize.
MatrixOp::mat_ptr_t sub_view(const Range1D &row_rng, const Range1D &col_rng) const
bool syrk(BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs) const
void Vp_StMtV(VectorMutable *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta) const
Interface adding operations specific for a symmetric matrix {abstract}.
value_type transVtMtV(const Vector &v_rhs1, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3) const
. One-based subregion index range class.
value_type transVtInvMtV(const Vector &v_rhs1, BLAS_Cpp::Transp trans_rhs2, const Vector &v_rhs3) 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
Abstract interface for objects that represent a space for mutable coordinate vectors.
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
std::ostream * out
bool Mp_StM(MatrixOp *mwo_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs) const
const LAPACK_C_Decl::f_int & M
void M_StMtInvM(MatrixOp *m_lhs, value_type alpha, const MatrixOp &mwo_rhs1, BLAS_Cpp::Transp trans_rhs1, BLAS_Cpp::Transp trans_rhs2) const
Base class for all matrices that support basic matrix operations.
void M_StInvMtM(MatrixOp *m_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const MatrixOp &mwo_rhs2, BLAS_Cpp::Transp trans_rhs2) const
const mwo_ptr_t & mwo() const
Abstract interface for mutable coordinate vectors {abstract}.
Abstract base class for all nonsingular polymorphic matrices that can be used to compute matrix-vecto...
Abstract base class for all nonsingular polymorphic matrices that can solve for linear system with bu...
Transp
TRANS.
Aggregate matrix class pulling together a MatrixOp object and a MatrixNonsing object into a unified m...
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
Concrete matrix type to represent general permutation (mapping) matrices.