6 std::cerr <<
"# [MARK] zgematrix::operator=(const zgematrix&)"
25 std::cerr <<
"# [MARK] zgematrix::operator+=(const zgematrix&)"
30 if(N!=mat.N || M!=mat.M){
31 std::cerr <<
"[ERROR] zgematrix::operator+=(zgematrix&)" << std::endl
32 <<
"These two matrises can not make a summation." << std::endl
33 <<
"Your input was (" << M <<
"x" << N <<
") += ("
34 << mat.M <<
"x" << mat.N <<
")." << std::endl;
39 for(
long i=0;
i<M*N;
i++){
Array[
i]+=mat.Array[
i]; }
48 std::cerr <<
"# [MARK] zgematrix::operator-=(const zgematrix&)"
53 if(N!=mat.N || M!=mat.M){
54 std::cerr <<
"[ERROR] zgematrix::operator-=(zgematrix&)" << std::endl
55 <<
"These two matrises can not make a sutraction." << std::endl
56 <<
"Your input was (" << M <<
"x" << N <<
") -= ("
57 << mat.M <<
"x" << mat.N <<
")." << std::endl;
62 for(
long i=0;
i<M*N;
i++){
Array[
i]-=mat.Array[
i]; }
71 std::cerr <<
"# [MARK] zgematrix::operator*=(const zgematrix&)"
77 std::cerr <<
"[ERROR] zgematrix::operator*=(zgematrix&)" << std::endl
78 <<
"These two matrises can not make a product." << std::endl
79 <<
"Your input was (" << M <<
"x" << N <<
") *= ("
80 << mat.M <<
"x" << mat.N <<
")." << std::endl;
86 zgemm_(
'N',
'N', M, mat.N, N, std::complex<double>(1.0,0.0),
Array, M,
87 mat.Array, mat.M, std::complex<double>(0.0,0.0), newmat.
array, M );
102 std::cerr <<
"# [MARK] operator+(const zgematrix&, const zgematrix&)"
107 if(matA.N!=matB.N || matA.M!=matB.M){
108 std::cerr <<
"[ERROR] operator+(zgematrix&, zgematrix&)" << std::endl
109 <<
"These two matrises can not make a summation." << std::endl
110 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") + ("
111 << matB.M <<
"x" << matB.N <<
")." << std::endl;
117 for(
long i=0; i<newmat.
m*newmat.
n; i++){
118 newmat.Array[i] =matA.Array[i]+matB.Array[i];
129 std::cerr <<
"# [MARK] operator-(const zgematrix&, const zgematrix&)"
134 if(matA.N!=matB.N || matA.M!=matB.M){
135 std::cerr <<
"[ERROR] operator-(zgematrix&, zgematrix&)" << std::endl
136 <<
"These two matrises can not make a subtraction." << std::endl
137 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") - ("
138 << matB.M <<
"x" << matB.N <<
")." << std::endl;
144 for(
long i=0; i<newmat.
m*newmat.
n; i++){
145 newmat.Array[i] =matA.Array[i]-matB.Array[i];
156 std::cerr <<
"# [MARK] operator*(const zgematrix&, const zgematrix&)"
162 std::cerr <<
"[ERROR] operator*(zgematrix&, zgematrix&)" << std::endl
163 <<
"These two matrises can not make a product." << std::endl
164 <<
"Your input was (" << matA.M <<
"x" << matA.N <<
") * ("
165 << matB.M <<
"x" << matB.N <<
")." << std::endl;
171 zgemm_(
'N',
'N', matA.M, matB.N, matA.N, std::complex<double>(1.0,0.0),
172 matA.Array, matA.M, matB.Array, matB.M,
173 std::complex<double>(0.0,0.0), newmat.
array, matA.M );
long const & m
matrix row size (readable)
Definition: zgematrix.hpp:14
void copy(const zgematrix &)
Definition: zgematrix-misc.hpp:72
zgematrix & operator-=(const zgematrix &)
Definition: zgematrix-zgematrix.hpp:45
friend _zrovector operator-(const _zrovector &)
Definition: _zrovector-unary.hpp:15
zgematrix & operator=(const zgematrix &)
Definition: zgematrix-zgematrix.hpp:3
long const & n
matrix column size (readable)
Definition: zgematrix.hpp:15
friend _zgematrix i(const zgematrix &)
Definition: zgematrix-calc.hpp:21
zgematrix & operator*=(const zgematrix &)
Definition: zgematrix-zgematrix.hpp:68
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
friend _zrovector operator*(const zrovector &, const zgematrix &)
Definition: zrovector-zgematrix.hpp:3
std::complex< double > * Array
1D Array to store vector data
Definition: _zrovector.hpp:8
zgematrix & operator+=(const zgematrix &)
Definition: zgematrix-zgematrix.hpp:22
friend void swap(zgematrix &, zgematrix &)
Definition: zgematrix-misc.hpp:154
std::complex< double > *const & array
1D array to store matrix data (readable)
Definition: zgematrix.hpp:16
friend const _zrovector & operator+(const _zrovector &)
Definition: _zrovector-unary.hpp:3