CPPLapack
 All Classes Files Functions Variables Friends Pages
dsymatrix-dcovector.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! dsymatrix*dcovector operator */
3 inline _dcovector operator*(const dsymatrix& 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.n << "x" << mat.n << ") * (" << vec.l << ")." << std::endl;
10  exit(1);
11  }
12 #endif//CPPL_DEBUG
13 
14  dcovector 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  return _(newvec);
23 }
CPPL_INT l
vector size
Definition: dcovector.hpp:9
double * array
1D array to store vector data
Definition: dcovector.hpp:11
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
CPPL_INT n
matrix column size
Definition: dsymatrix.hpp:10
_dcovector operator*(const dsymatrix &mat, const dcovector &vec)
Real Double-precision Column Vector Class.
Definition: dcovector.hpp:3
double * array
1D array to store matrix data
Definition: dsymatrix.hpp:11
(DO NOT USE) Smart-temporary Real Double-precision Column Vector Class
Definition: _dcovector.hpp:3
_dcovector _(dcovector &vec)