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

Go to the source code of this file.

Functions

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

Function Documentation

_zrovector operator* ( const zrovector vec,
const zhematrix mat 
)
inline

zrovector*zhematrix operator

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

References _(), zrovector::array, zhematrix::array, zrovector::l, and zhematrix::n.

4 {CPPL_VERBOSE_REPORT;
5 #ifdef CPPL_DEBUG
6  if(vec.l!=mat.n){
7  ERROR_REPORT;
8  std::cerr << "These vector and matrix can not make a product." << std::endl
9  << "Your input was (" << vec.l << ") * (" << mat.n << "x" << mat.n << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  zrovector newvec(mat.n);
15  char uplo ='l';
16  comple alpha =comple(1.,0.);
17  CPPL_INT inc =1;
18  comple beta =comple(0.,0.);
19 
20  zhemv_( &uplo, &mat.n, &alpha, mat.array, &mat.n, vec.array, &inc, &beta, newvec.array, &inc );
21 
22  return _(newvec);
23 }
CPPL_INT l
vector size
Definition: zrovector.hpp:9
CPPL_INT n
matrix column size
Definition: zhematrix.hpp:11
Complex Double-precision Row Vector Class.
Definition: zrovector.hpp:3
comple * array
1D array to store matrix data
Definition: zhematrix.hpp:12
_dcovector _(dcovector &vec)
comple * array
1D array to store vector data
Definition: zrovector.hpp:10