CPPLapack
 All Classes Files Functions Variables Friends Pages
_zrovector-_zgematrix.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! _zrovector*_zgematrix operator */
3 inline _zrovector operator*(const _zrovector& vec, const _zgematrix& mat)
4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(vec.l!=mat.m){
7  ERROR_REPORT;
8  std::cerr << "These vector and matrix can not make a product." << std::endl
9  << "Your input was (" << vec.l << ") * (" << mat.m << "x" << mat.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  zrovector newvec(mat.n);
15  char trans ='T';
16  comple alpha =comple(1.,0.);
17  CPPL_INT inc =1;
18  comple beta =comple(0.,0.);
19 
20  zgemv_( &trans, &mat.m, &mat.n, &alpha, mat.array, &mat.m, vec.array, &inc, &beta, newvec.array, &inc );
21 
22  vec.destroy();
23  mat.destroy();
24  return _(newvec);
25 }
CPPL_INT m
matrix row size
Definition: _zgematrix.hpp:9
_zrovector operator*(const _zrovector &vec, const _zgematrix &mat)
void destroy() const
CPPL_INT l
vector size
Definition: _zrovector.hpp:9
Complex Double-precision Row Vector Class.
Definition: zrovector.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision Row Vector Class
Definition: _zrovector.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
comple * array
1D array to store vector data
Definition: _zrovector.hpp:10
void destroy() const
comple * array
1D array to store matrix data
Definition: _zgematrix.hpp:11
_dcovector _(dcovector &vec)
comple * array
1D array to store vector data
Definition: zrovector.hpp:10
CPPL_INT n
matrix column size
Definition: _zgematrix.hpp:10