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