CPPLapack
 All Classes Files Functions Variables Friends Pages
Functions
_zgbmatrix-_zcovector.hpp File Reference

Go to the source code of this file.

Functions

_zcovector operator* (const _zgbmatrix &mat, const _zcovector &vec)
 

Function Documentation

_zcovector operator* ( const _zgbmatrix mat,
const _zcovector vec 
)
inline

_zgbmatrix*_zcovector operator

Definition at line 3 of file _zgbmatrix-_zcovector.hpp.

References _(), _zcovector::array, zcovector::array, _zgbmatrix::array, _zgbmatrix::destroy(), _zcovector::destroy(), _zgbmatrix::kl, _zgbmatrix::ku, _zcovector::l, _zgbmatrix::m, and _zgbmatrix::n.

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 lda =mat.kl+mat.ku+1;
18  CPPL_INT inc =1;
19  comple beta =comple(0.,0.);
20 
21  zgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc );
22 
23  mat.destroy();
24  vec.destroy();
25  return _(newvec);
26 }
CPPL_INT ku
upper band width
Definition: _zgbmatrix.hpp:12
CPPL_INT kl
lower band width
Definition: _zgbmatrix.hpp:11
void destroy() const
void destroy() const
comple * array
1D array to store vector data
Definition: _zcovector.hpp:10
CPPL_INT m
matrix row size
Definition: _zgbmatrix.hpp:9
comple * array
1D array to store matrix data
Definition: _zgbmatrix.hpp:13
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
CPPL_INT l
vector size
Definition: _zcovector.hpp:9
CPPL_INT n
matrix column size
Definition: _zgbmatrix.hpp:10
_dcovector _(dcovector &vec)