CPPLapack
 All Classes Files Functions Variables Friends Pages
_drovector-_dgbmatrix.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! _drovector*_dgbmatrix operator */
3 inline _drovector operator*(const _drovector& vec, const _dgbmatrix& 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  drovector newvec(mat.n);
15  char trans ='T';
16  double alpha =1.;
17  CPPL_INT lda =mat.kl+mat.ku+1;
18  CPPL_INT inc =1;
19  double beta =0.;
20 
21  dgbmv_( &trans, &mat.m, &mat.n, &mat.kl, &mat.ku, &alpha, mat.array, &lda, vec.array, &inc, &beta, newvec.array, &inc );
22 
23  vec.destroy();
24  mat.destroy();
25  return _(newvec);
26 }
double * array
1D array to store vector data
Definition: drovector.hpp:11
CPPL_INT ku
upper band width
Definition: _dgbmatrix.hpp:12
double * array
1D array to store vector data
Definition: _drovector.hpp:11
CPPL_INT l
vector size
Definition: _drovector.hpp:9
void destroy() const
void destroy() const
CPPL_INT kl
lower band width
Definition: _dgbmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dgbmatrix.hpp:10
Real Double-precision Row Vector Class.
Definition: drovector.hpp:3
(DO NOT USE) Smart-temporary Real Double-precision Row Vector Class
Definition: _drovector.hpp:3
double * array
1D array to store matrix data
Definition: _dgbmatrix.hpp:13
(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class
Definition: _dgbmatrix.hpp:3
_dcovector _(dcovector &vec)
_drovector operator*(const _drovector &vec, const _dgbmatrix &mat)
CPPL_INT m
matrix row size
Definition: _dgbmatrix.hpp:9