CPPLapack
 All Classes Files Functions Variables Friends Pages
zgematrix-zcovector.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! zgematrix*zcovector operator */
3 inline _zcovector operator*(const zgematrix& mat, const zcovector& vec)
4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(mat.n!=vec.l){
7  ERROR_REPORT;
8  std::cerr << "These matrix and vector can not make a product." << std::endl
9  << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  zcovector newvec(mat.m);
15  char trans ='n';
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  return _(newvec);
23 }
comple * array
1D array to store vector data
Definition: zcovector.hpp:10
CPPL_INT l
vector size
Definition: zcovector.hpp:9
CPPL_INT n
matrix column size
Definition: zgematrix.hpp:10
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
comple * array
1D array to store matrix data
Definition: zgematrix.hpp:11
CPPL_INT m
matrix row size
Definition: zgematrix.hpp:9
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision Column Vector Class
Definition: _zcovector.hpp:3
_dcovector _(dcovector &vec)
_zcovector operator*(const zgematrix &mat, const zcovector &vec)