AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects Version of the Day
AbstractLinAlgPack_LinAlgOpPackHack.hpp
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 //
00029 
00030 #ifndef LIN_ALG_OP_PACK_HACK_H
00031 #define LIN_ALG_OP_PACK_HACK_H
00032 
00033 #include "AbstractLinAlgPack_LinAlgOpPack.hpp"
00034 
00035 #include "DenseLinAlgPack_LinAlgOpPack.hpp"
00036 #include "AbstractLinAlgPack_MatrixSymOpNonsingSerial.hpp"
00037 
00038 namespace LinAlgOpPack {
00039 
00040 using DenseLinAlgPack::DVector;
00041 using DenseLinAlgPack::DVectorSlice;
00042 using DenseLinAlgPack::DMatrixSlice;
00043 using AbstractLinAlgPack::SpVectorSlice;
00044 using AbstractLinAlgPack::GenPermMatrixSlice;
00045 using AbstractLinAlgPack::MatrixOp;
00046 using AbstractLinAlgPack::MatrixNonsing;
00047 using AbstractLinAlgPack::MatrixOpNonsing;
00048 
00050 void assign(DMatrixSlice* gms_lhs, const MatrixOp& M_rhs, BLAS_Cpp::Transp trans_rhs);
00051 
00054 void Mp_StM(
00055   DMatrixSlice* vs_lhs, value_type alpha
00056   ,const MatrixOp& mwo_rhs1, BLAS_Cpp::Transp trans_rhs1
00057   );
00058 
00061 void Vp_StMtV(
00062   DVectorSlice* vs_lhs, value_type alpha, const MatrixOp& mwo_rhs1
00063   ,BLAS_Cpp::Transp trans_rhs1, const DVectorSlice& vs_rhs2
00064   ,value_type beta = 1.0 );
00065 
00068 void Vp_MtV(
00069   DVectorSlice* vs_lhs, const MatrixOp& mwo_rhs1
00070   ,BLAS_Cpp::Transp trans_rhs1, const DVectorSlice& vs_rhs2
00071   ,value_type beta = 1.0 );
00072 
00075 void Vp_StMtV(
00076   DVectorSlice* vs_lhs, value_type alpha, const MatrixOp& mwo_rhs1
00077   ,BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice& sv_rhs2
00078   ,value_type beta = 1.0 );
00079 
00082 void V_MtV(
00083   DVectorSlice* vs_lhs, const MatrixOp& mwo_rhs1
00084   ,BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice& sv_rhs2 );
00085 
00088 void V_InvMtV(
00089   DVectorSlice* vs_lhs, const MatrixOpNonsing& mwo_rhs1
00090   ,BLAS_Cpp::Transp trans_rhs1, const DVectorSlice& vs_rhs2 );
00091 
00094 void V_InvMtV(
00095   DVector* v_lhs, const MatrixOpNonsing& mwo_rhs1
00096   ,BLAS_Cpp::Transp trans_rhs1, const DVectorSlice& vs_rhs2 );
00097 
00100 void V_InvMtV(
00101   DVectorSlice* vs_lhs, const MatrixOpNonsing& mwo_rhs1
00102   ,BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice& sv_rhs2 );
00103 
00106 void V_InvMtV(
00107   DVector* v_lhs, const MatrixOpNonsing& mwo_rhs1
00108   ,BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice& sv_rhs2 );
00109 
00112 void Vp_StPtMtV(
00113   DVectorSlice* vs_lhs, value_type alpha
00114   ,const GenPermMatrixSlice& gpms_rhs1, BLAS_Cpp::Transp trans_rhs1
00115   ,const MatrixOp& mwo_rhs2, BLAS_Cpp::Transp trans_rhs2
00116   ,const DVectorSlice& vs_rhs3, value_type beta = 1.0 );
00117 
00120 void Vp_StPtMtV(
00121   DVectorSlice* vs_lhs, value_type alpha
00122   ,const GenPermMatrixSlice& gpms_rhs1, BLAS_Cpp::Transp trans_rhs1
00123   ,const MatrixOp& mwo_rhs2, BLAS_Cpp::Transp trans_rhs2
00124   ,const SpVectorSlice& sv_rhs3, value_type beta = 1.0 );
00125 
00126 } // end namespace LinAlgOpPack
00127 
00128 // //////////////////////
00129 // Inline functions
00130 
00131 inline
00132 void LinAlgOpPack::Vp_MtV(
00133   DVectorSlice* vs_lhs, const MatrixOp& mwo_rhs1
00134   ,BLAS_Cpp::Transp trans_rhs1, const DVectorSlice& vs_rhs2
00135   ,value_type beta )
00136 {
00137   Vp_StMtV(vs_lhs,1.0,mwo_rhs1,trans_rhs1,vs_rhs2,beta);
00138 }
00139 
00140 inline
00141 void LinAlgOpPack::V_MtV(
00142   DVectorSlice* vs_lhs, const MatrixOp& mwo_rhs1
00143   ,BLAS_Cpp::Transp trans_rhs1, const SpVectorSlice& sv_rhs2 )
00144 {
00145   Vp_StMtV(vs_lhs,1.0,mwo_rhs1,trans_rhs1,sv_rhs2);
00146 }
00147 
00148 
00149 
00150 
00151 #endif // LIN_ALG_OP_PACK_HACK_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends