18 if(
n!=mat.
n ||
m!=mat.
m){
20 std::cerr <<
"These two matrises can not make a summation." << std::endl
21 <<
"Your input was (" <<
m <<
"x" <<
n <<
") += (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
26 const CPPL_INT size =
m*
n;
27 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++){
64 std::cerr <<
"These two matrises can not make a product." << std::endl
65 <<
"Your input was (" <<
m <<
"x" <<
n <<
") *= (" << mat.
m <<
"x" << mat.
n <<
")." << std::endl;
73 comple alpha =comple(1.,0.);
74 comple beta =comple(0.,0.);
76 zgemm_( &transa, &transb, &
m, &mat.
n, &
n, &alpha,
array, &
m, mat.
array, &mat.
m, &beta, newmat.
array, &
m );
92 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
94 std::cerr <<
"These two matrises can not make a summation." << std::endl
95 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
100 const CPPL_INT size =matA.
m*matA.
n;
101 for(CPPL_INT
i=0;
i<size;
i++){
111 {CPPL_VERBOSE_REPORT;
113 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
115 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
116 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
121 const CPPL_INT size =matA.
m*matA.
n;
122 for(CPPL_INT
i=0;
i<size;
i++){
132 {CPPL_VERBOSE_REPORT;
136 std::cerr <<
"These two matrises can not make a product." << std::endl
137 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
145 comple alpha =comple(1.,0.);
146 comple beta =comple(0.,0.);
148 zgemm_( &transa, &transb, &matA.
m, &matB.
n, &matA.
n, &alpha, matA.
array, &matA.
m, matB.
array, &matB.
m, &beta, newmat.
array, &matA.
m );
_zgematrix operator-(const zgematrix &matA, const _zgematrix &matB)
CPPL_INT m
matrix row size
void shallow_copy(const _zgematrix &)
zgematrix & operator-=(const zgematrix &)
zgematrix & operator=(const zgematrix &)
_dgematrix i(const _dgbmatrix &mat)
_zgematrix operator+(const zgematrix &matA, const _zgematrix &matB)
friend _zgematrix i(const zgematrix &)
CPPL_INT n
matrix column size
zgematrix & operator*=(const zgematrix &)
Complex Double-precision General Dence Matrix Class.
comple * array
1D array to store matrix data
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
comple * array
1D array to store matrix data
CPPL_INT m
matrix row size
zgematrix & operator+=(const zgematrix &)
friend void swap(zgematrix &, zgematrix &)
_dcovector _(dcovector &vec)
_zgematrix operator*(const zgematrix &matA, const _zgematrix &matB)
CPPL_INT n
matrix column size