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