My Project
_zcovector-_zrovector.hpp
1 //=============================================================================
3 inline _zgematrix operator*(const _zcovector& covec, const _zrovector& rovec)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] operator*(const _zcovector&, const _zrovector&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10 #ifdef CPPL_DEBUG
11  if(covec.L!=rovec.L){
12  std::cerr << "[ERROR] operator*(const zcovector&, const zrovector&)"
13  << std::endl
14  << "These two vectors can not make a product." << std::endl
15  << "Your input was (" << covec.L << ") * (" << rovec.L << ")."
16  << std::endl;
17  exit(1);
18  }
19 #endif//CPPL_DEBUG
20 
21  zgematrix newmat(covec.L, covec.L);
22  for(long i=0; i<newmat.m; i++){
23  for(long j=0; j<newmat.n; j++){
24  newmat(i,j) =covec(i)*rovec(j);
25  }
26  }
27 
28  covec.destroy();
29  rovec.destroy();
30  return _(newmat);
31 }
void destroy() const
Definition: _zrovector-misc.hpp:3
long L
vector size
Definition: _zrovector.hpp:7
void destroy() const
Definition: _zcovector-misc.hpp:3
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision Row Vector Class
Definition: _zrovector.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
friend _drovector operator*(const drovector &, const dgematrix &)
Definition: drovector-dgematrix.hpp:3
long const & m
matrix row size (readable)
Definition: zgematrix.hpp:14
long const & n
matrix column size (readable)
Definition: zgematrix.hpp:15
(DO NOT USE) Smart-temporary Complex Double-precision Column Vector Class
Definition: _zcovector.hpp:3
long L
vector size
Definition: _zcovector.hpp:7