CPPLapack
 All Classes Files Functions Variables Friends
zgbmatrix-_zcovector.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 /*! zgbmatrix*_zcovector operator */
00003 inline _zcovector operator*(const zgbmatrix& mat, const _zcovector& vec)
00004 {VERBOSE_REPORT;
00005 #ifdef  CPPL_DEBUG
00006   if(mat.n!=vec.l){
00007     ERROR_REPORT;
00008     std::cerr << "These matrix and vector can not make a product." << std::endl
00009               << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl;
00010     exit(1);
00011   }
00012 #endif//CPPL_DEBUG
00013   
00014   zcovector newvec(mat.m);
00015   zgbmv_( 'n', mat.m, mat.n, mat.kl, mat.ku, comple(1.0,0.0), mat.array,
00016           mat.kl+mat.ku+1, vec.array, 1, comple(0.0,0.0), newvec.array, 1 );
00017   
00018   vec.destroy();
00019   return _(newvec);
00020 }
 All Classes Files Functions Variables Friends