Main Page | Class List | File List | Class Members | File Members | Related Pages

_dgematrix-dcovector.hpp File Reference

Go to the source code of this file.

Functions

_dcovector operator * (const _dgematrix &mat, const dcovector &vec)


Function Documentation

_dcovector operator * const _dgematrix mat,
const dcovector vec
[inline]
 

_dgematrix*dcovector operator

Definition at line 3 of file _dgematrix-dcovector.hpp.

References _dcovector::Array, dcovector::Array, _dgematrix::Array, _dcovector::Desc, dcovector::Desc, _dgematrix::Desc, _dgematrix::destroy(), dcovector::L, _dgematrix::M, and _dgematrix::N.

00004 {
00005 #ifdef  CPPSL_DEBUG
00006   if(mat.N!=vec.L){
00007     std::cerr << "[ERROR] operator*(const _dgematrix&, const dcovector&)"
00008               << std::endl
00009               << "These matrix and vector can not make a product." << std::endl
00010               << "Your input was (" << mat.M << "x" << mat.N << ") * ("
00011               << vec.L << ")." << std::endl;
00012     exit(1);
00013   }
00014 #endif//CPPSL_DEBUG
00015   
00016   _dcovector newvec(mat.M);
00017   pdgemv_( 'N', mat.M, mat.N, 1.0, mat.Array, 1, 1, mat.Desc,
00018            vec.Array, 1, 1, vec.Desc, 1, 0.0,
00019            newvec.Array, 1, 1, newvec.Desc, 1 );
00020   
00021   mat.destroy();
00022   return newvec;
00023 }


Generated on Sat Jan 31 19:25:44 2004 for CPPScaLapack by doxygen 1.3.5