VERB_code_2.3
_drovector-_dgbmatrix.hpp
1 //=============================================================================
3 inline _drovector operator*(const _drovector& vec, const _dgbmatrix& mat)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] operator*(const _drovector&, const _dgbmatrix&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10 #ifdef CPPL_DEBUG
11  if(vec.L!=mat.M){
12  std::cerr << "[ERROR] operator*(const drovector&, const _dgbmatrix&)"
13  << std::endl
14  << "These vector and matrix can not make a product."
15  << std::endl
16  << "Your input was (" << vec.L << ") * ("
17  << mat.M << "x" << mat.N << ")." << std::endl;
18  exit(1);
19  }
20 #endif//CPPL_DEBUG
21 
22  drovector newvec(mat.N);
23  dgbmv_( 'T', mat.M, mat.N, mat.KL, mat.KU, 1.0,
24  mat.Array, mat.KL+mat.KU+1, vec.Array, 1, 0.0, newvec.array, 1 );
25 
26  vec.destroy();
27  mat.destroy();
28  return _(newvec);
29 }
long KL
lower band width
Definition: _dgbmatrix.hpp:9
long M
matrix row size
Definition: _dgbmatrix.hpp:7
void destroy() const
Definition: _dgbmatrix-misc.hpp:3
void destroy() const
Definition: _drovector-misc.hpp:3
long N
matrix column size
Definition: _dgbmatrix.hpp:8
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:11
friend _drovector operator*(const drovector &, const dgematrix &)
Definition: drovector-dgematrix.hpp:3
(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class
Definition: _dgbmatrix.hpp:3
long L
vector size
Definition: _drovector.hpp:7
double * Array
1D Array to store vector data
Definition: _drovector.hpp:8
double *const & array
1D array to store vector data (readable)
Definition: drovector.hpp:13
long KU
upper band width
Definition: _dgbmatrix.hpp:10