6 std::cerr <<
"# [MARK] operator+(const _dgematrix&, const _dgematrix&)"
11 if(matA.
N!=matB.
N || matA.
M!=matB.
M){
12 std::cerr <<
"[ERROR] operator+(_dgematrix&, _dgematrix&)" << std::endl
13 <<
"These two matrises can not make a summation." << std::endl
14 <<
"Your input was (" << matA.
M <<
"x" << matA.
N <<
") + ("
15 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
20 for(
long i=0; i<matA.
M*matA.
N; i++){ matA.
Array[i]+=matB.
Array[i]; }
31 std::cerr <<
"# [MARK] operator-(const _dgematrix&, const _dgematrix&)"
36 if(matA.
N!=matB.
N || matA.
M!=matB.
M){
37 std::cerr <<
"[ERROR] operator-(_dgematrix&, _dgematrix&)" << std::endl
38 <<
"These two matrises can not make a subtraction." << std::endl
39 <<
"Your input was (" << matA.
M <<
"x" << matA.
N <<
") - ("
40 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
45 for(
long i=0; i<matA.
M*matA.
N; i++){ matA.
Array[i]-=matB.
Array[i]; }
56 std::cerr <<
"# [MARK] operator*(const _dgematrix&, const _dgematrix&)"
62 std::cerr <<
"[ERROR] operator*(_dgematrix&, _dgematrix&)" << std::endl
63 <<
"These two matrises can not make a product." << std::endl
64 <<
"Your input was (" << matA.
M <<
"x" << matA.
N <<
") * ("
65 << matB.
M <<
"x" << matB.
N <<
")." << std::endl;
71 dgemm_(
'N',
'N', matA.
M, matB.
N, matA.
N, 1.0, matA.
Array, matA.
M,
72 matB.
Array, matB.
M, 0.0, newmat.array, matA.
M );
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
friend _drovector operator-(const _drovector &)
Definition: _drovector-unary.hpp:15
(DO NOT USE) Smart-temporary Real Double-precision General Dence Matrix Class
Definition: _dgematrix.hpp:3
long N
matrix column size
Definition: _dgematrix.hpp:8
double * Array
1D array to store matrix data
Definition: _dgematrix.hpp:9
friend _drovector operator*(const drovector &, const dgematrix &)
Definition: drovector-dgematrix.hpp:3
void destroy() const
Definition: _dgematrix-misc.hpp:3
friend const _drovector & operator+(const _drovector &)
Definition: _drovector-unary.hpp:3
long M
matrix row size
Definition: _dgematrix.hpp:7