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