CPPLapack
 All Classes Files Functions Variables Friends Pages
Functions
_dsymatrix-_dcovector.hpp File Reference

Go to the source code of this file.

Functions

_dcovector operator* (const _dsymatrix &mat, const _dcovector &vec)
 

Function Documentation

_dcovector operator* ( const _dsymatrix mat,
const _dcovector vec 
)
inline

_dsymatrix*_dcovector operator

Definition at line 3 of file _dsymatrix-_dcovector.hpp.

References _(), _dcovector::array, dcovector::array, _dsymatrix::array, _dsymatrix::destroy(), _dcovector::destroy(), _dcovector::l, and _dsymatrix::n.

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  mat.destroy();
23  vec.destroy();
24  return _(newvec);
25 }
CPPL_INT l
vector size
Definition: _dcovector.hpp:9
void destroy() const
double * array
1D array to store matrix data
Definition: _dsymatrix.hpp:12
void destroy() const
Real Double-precision Column Vector Class.
Definition: dcovector.hpp:3
CPPL_INT n
matrix column size
Definition: _dsymatrix.hpp:11
double * array
1D array to store vector data
Definition: _dcovector.hpp:11
_dcovector _(dcovector &vec)