CPPLapack
 All Classes Files Functions Variables Friends
Functions
zrovector-_zgematrix.hpp File Reference

Go to the source code of this file.

Functions

_zrovector operator* (const zrovector &vec, const _zgematrix &mat)

Function Documentation

_zrovector operator* ( const zrovector vec,
const _zgematrix mat 
) [inline]

zrovector*_zgematrix operator

Definition at line 3 of file zrovector-_zgematrix.hpp.

References _(), zrovector::array, _zgematrix::array, _zgematrix::destroy(), zrovector::l, _zgematrix::m, and _zgematrix::n.

{VERBOSE_REPORT;
#ifdef  CPPL_DEBUG
  if(vec.l!=mat.m){
    ERROR_REPORT;
    std::cerr << "These vector and matrix can not make a product." << std::endl
              << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl;
    exit(1);
  }
#endif//CPPL_DEBUG
  
  zrovector newvec(mat.n);
  zgemv_( 'T', mat.m, mat.n, comple(1.0,0.0), mat.array, mat.m,
          vec.array, 1, comple(0.0,0.0), newvec.array, 1 );
  
  mat.destroy();
  return _(newvec);
}
 All Classes Files Functions Variables Friends