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