00001
00003 inline _dcovector operator*(const dgbmatrix& mat, const _dcovector& vec)
00004 {
00005 #ifdef CPPL_VERBOSE
00006 std::cerr << "# [MARK] operator*(const dgbmatrix&, const _dcovector&)"
00007 << std::endl;
00008 #endif//CPPL_VERBOSE
00009
00010 #ifdef CPPL_DEBUG
00011 if(mat.N!=vec.L){
00012 std::cerr << "[ERROR] operator*(const dgbmatrix&, const _dcovector&)"
00013 << std::endl
00014 << "These matrix and vector can not make a product." << std::endl
00015 << "Your input was (" << mat.M << "x" << mat.N << ") * ("
00016 << vec.L << ")." << std::endl;
00017 exit(1);
00018 }
00019 #endif//CPPL_DEBUG
00020
00021 dcovector newvec(mat.M);
00022 dgbmv_( 'N', mat.M, mat.N, mat.KL, mat.KU, 1.0, mat.Array,
00023 mat.KL+mat.KU+1, vec.Array, 1, 0.0, newvec.array, 1 );
00024
00025 vec.destroy();
00026 return _(newvec);
00027 }