6 std::cerr <<
"# [MARK] operator+(const _zhematrix&, const zgematrix&)"
11 if(matA.
N!=matB.N || matA.
N!=matB.M){
12 std::cerr <<
"[ERROR] operator+(_zgematrix&, zgematrix&)" << std::endl
13 <<
"These two matrises can not make a summation." << std::endl
14 <<
"Your input was (" << matA.
N <<
"x" << matA.
N <<
") + ("
15 << matB.M <<
"x" << matB.N <<
")." << std::endl;
21 for(
long i=0; i<matA.
N; i++){
for(
long j=0; j<matA.
N; j++){
22 newmat(i,j) =matA(i,j)+matB(i,j);
34 std::cerr <<
"# [MARK] operator-(const _zhematrix&, const zgematrix&)"
39 if(matA.
N!=matB.N || matA.
N!=matB.M){
40 std::cerr <<
"[ERROR] operator-(_zhematrix&, zgematrix&)" << std::endl
41 <<
"These two matrises can not make a subtraction." << std::endl
42 <<
"Your input was (" << matA.
N <<
"x" << matA.
N <<
") - ("
43 << matB.M <<
"x" << matB.N <<
")." << std::endl;
49 for(
long i=0; i<matA.
N; i++){
50 for(
long j=0; j<matA.
N; j++){
51 newmat(i,j) =matA(i,j)-matB(i,j);
64 std::cerr <<
"# [MARK] operator*(const _zhematrix&, const zgematrix&)"
70 std::cerr <<
"[ERROR] operator*(_zhematrix&, zgematrix&)" << std::endl
71 <<
"These two matrises can not make a product." << std::endl
72 <<
"Your input was (" << matA.
N <<
"x" << matA.
N <<
") * ("
73 << matB.M <<
"x" << matB.N <<
")." << std::endl;
79 zhemm_(
'L',
'L', matA.
N, matB.N, std::complex<double>(1.0,0.0),
80 matA.
Array, matA.
N, matB.Array, matB.M,
81 std::complex<double>(0.0,0.0), newmat.
array, newmat.M );
std::complex< double > *const & array
1D array to store matrix data (readable)
Definition: zgematrix.hpp:16
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
Definition: _zhematrix.hpp:3
friend _zrovector operator-(const _zrovector &)
Definition: _zrovector-unary.hpp:15
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
void destroy() const
Definition: _zhematrix-misc.hpp:3
std::complex< double > * Array
1D Array to store matrix data
Definition: _zhematrix.hpp:8
friend _zrovector operator*(const zrovector &, const zgematrix &)
Definition: zrovector-zgematrix.hpp:3
long N
matrix column or row size
Definition: _zhematrix.hpp:7
friend const _zrovector & operator+(const _zrovector &)
Definition: _zrovector-unary.hpp:3