20 if(
n!=mat.
n ||
m!=mat.
m){
22 std::cerr <<
"These two matrises can not make a summation." << std::endl
23 <<
"Your input was (" <<
m <<
"x" <<
n <<
") += (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
28 const CPPL_INT size =
m*
n;
29 for(CPPL_INT
i=0;
i<size;
i++){
40 if(
n!=mat.
n ||
m!=mat.
m){
42 std::cerr <<
"These two matrises can not make a sutraction." << std::endl
43 <<
"Your input was (" <<
m <<
"x" <<
n <<
") -= (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
48 const CPPL_INT size =
m*
n;
49 for(CPPL_INT
i=0;
i<size;
i++){
62 std::cerr <<
"These two matrises can not make a product." << std::endl
63 <<
"Your input was (" <<
m <<
"x" <<
n <<
") *= (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
71 comple alpha =comple(1.,0.);
72 comple beta =comple(0.,0.);
74 zgemm_( &transa, &transb, &
m, &mat.
n, &
n, &alpha,
array, &
m, mat.
array, &mat.
m, &beta, newmat.
array, &
m );
89 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
91 std::cerr <<
"These two matrises can not make a summation." << std::endl
92 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
99 const CPPL_INT size =matA.
m*matA.
n;
100 for(CPPL_INT
i=0;
i<size;
i++){
110 {CPPL_VERBOSE_REPORT;
112 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
114 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
115 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
122 const CPPL_INT size =matA.
m*matA.
n;
123 for(CPPL_INT
i=0;
i<size;
i++){
133 {CPPL_VERBOSE_REPORT;
137 std::cerr <<
"These two matrises can not make a product." << std::endl
138 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
146 comple alpha =comple(1.,0.);
147 comple beta =comple(0.,0.);
149 zgemm_( &transa, &transb, &matA.
m, &matB.
n, &matA.
n, &alpha, matA.
array, &matA.
m, matB.
array, &matB.
m, &beta, newmat.
array, &matA.
m );
161 {CPPL_VERBOSE_REPORT;
163 if( matA.
m!=matB.
m || matA.
n!=matB.
n ){
165 std::cerr <<
"These two matrices can not make Hadamerd product." << std::endl
166 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") and (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
173 for(CPPL_INT
i=0;
i<newmat.
m;
i++){
174 for(CPPL_INT j=0; j<newmat.
n; j++){
175 newmat(
i,j) =matA(
i,j)*matB(
i,j);
_zgematrix operator+(const zgematrix &matA, const zgematrix &matB)
void copy(const zgematrix &)
zgematrix & operator-=(const zgematrix &)
zgematrix & operator=(const zgematrix &)
_dgematrix i(const _dgbmatrix &mat)
friend _zgematrix i(const zgematrix &)
CPPL_INT n
matrix column size
zgematrix & operator*=(const zgematrix &)
Complex Double-precision General Dence Matrix Class.
_zgematrix operator-(const zgematrix &matA, const zgematrix &matB)
comple * array
1D array to store matrix data
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
CPPL_INT m
matrix row size
zgematrix & operator+=(const zgematrix &)
friend void swap(zgematrix &, zgematrix &)
_dcovector _(dcovector &vec)
_zgematrix hadamerd(const zgematrix &matA, const zgematrix &matB)
_zgematrix operator*(const zgematrix &matA, const zgematrix &matB)