My Project
zgbmatrix-_zcovector.hpp
1 //=============================================================================
3 inline _zcovector operator*(const zgbmatrix& mat, const _zcovector& vec)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] operator*(const zgbmatrix&, const _zcovector&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10 #ifdef CPPL_DEBUG
11  if(mat.N!=vec.L){
12  std::cerr << "[ERROR] operator*(const zgbmatrix&, const _zcovector&)"
13  << std::endl
14  << "These matrix and vector can not make a product." << std::endl
15  << "Your input was (" << mat.M << "x" << mat.N << ") * ("
16  << vec.L << ")." << std::endl;
17  exit(1);
18  }
19 #endif//CPPL_DEBUG
20 
21  zcovector newvec(mat.M);
22  zgbmv_( 'N', mat.M, mat.N, mat.KL, mat.KU, std::complex<double>(1.0,0.0), mat.Array,
23  mat.KL+mat.KU+1, vec.Array, 1, std::complex<double>(0.0,0.0), newvec.array, 1 );
24 
25  vec.destroy();
26  return _(newvec);
27 }
void destroy() const
Definition: _zcovector-misc.hpp:3
std::complex< double > *const & array
1D array to store vector data (readable)
Definition: zcovector.hpp:13
Complex Double-precision General Band Matrix Class.
Definition: zgbmatrix.hpp:3
friend _zrovector operator*(const zrovector &, const zgematrix &)
Definition: zrovector-zgematrix.hpp:3
std::complex< double > * Array
1D Array to store vector data
Definition: _zcovector.hpp:8
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision Column Vector Class
Definition: _zcovector.hpp:3
long L
vector size
Definition: _zcovector.hpp:7