6 if(matA.
n!=matB.
n || matA.
n!=matB.
m){
8 std::cerr <<
"These two matrises can not make a summation." << std::endl
9 <<
"Your input was (" << matA.
n <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
14 for(CPPL_INT
i=0;
i<matA.
n;
i++){
15 for(CPPL_INT j=0; j<matA.
n; j++){
16 matB(
i,j) += matA(
i,j);
28 if(matA.
n!=matB.
n || matA.
n!=matB.
m){
30 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
31 <<
"Your input was (" << matA.
n <<
"x" << matA.
n <<
") - (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
36 for(CPPL_INT
i=0;
i<matA.
n;
i++){
37 for(CPPL_INT j=0; j<matA.
n; j++){
38 matB(
i,j) =matA(
i,j)-matB(
i,j);
52 std::cerr <<
"These two matrises can not make a product." << std::endl
53 <<
"Your input was (" << matA.
n <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
61 comple alpha =comple(1.,0.);
62 comple beta =comple(0.,0.);
64 zhemm_( &side, &uplo, &matA.
n, &matB.
n, &alpha, matA.
array, &matA.
n, matB.
array, &matB.
m, &beta, newmat.
array, &newmat.
m );
_zgematrix operator*(const zhematrix &matA, const _zgematrix &matB)
CPPL_INT m
matrix row size
_dgematrix i(const _dgbmatrix &mat)
_zgematrix operator+(const zhematrix &matA, const _zgematrix &matB)
Complex Double-precision General Dence Matrix Class.
CPPL_INT n
matrix column size
_zgematrix operator-(const zhematrix &matA, const _zgematrix &matB)
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
comple * array
1D array to store matrix data
CPPL_INT m
matrix row size
Complex Double-precision Hermitian Matrix Class [l-type (UPLO=l) Strage].
_dcovector _(dcovector &vec)
CPPL_INT n
matrix column size