VERB_code_2.3
_dcovector-drovector.hpp
1 //=============================================================================
3 inline _dgematrix operator*(const _dcovector& covec, const drovector& rovec)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] operator*(const _dcovector&, const drovector&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10 #ifdef CPPL_DEBUG
11  if(covec.L!=rovec.L){
12  std::cerr << "[ERROR] operator*(const _dcovector&, const drovector&)"
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  dgematrix 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  return _(newmat);
30 }
long const & m
matrix row size (readable)
Definition: dgematrix.hpp:14
long const & n
matrix column size (readable)
Definition: dgematrix.hpp:15
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
Real Double-precision Row Vector Class.
Definition: drovector.hpp:3
(DO NOT USE) Smart-temporary Real Double-precision General Dence Matrix Class
Definition: _dgematrix.hpp:3
long L
vector size
Definition: _dcovector.hpp:7
void destroy() const
Definition: _dcovector-misc.hpp:3
(DO NOT USE) Smart-temporary Real Double-precision Column Vector Class
Definition: _dcovector.hpp:3