6 if(
n!=mat.
n ||
m!=mat.
n){
8 std::cerr <<
"These two matrises can not make a summation." << std::endl
9 <<
"Your input was (" <<
m <<
"x" <<
n <<
") += (" << mat.
n <<
"x" << mat.
n <<
")." << std::endl;
14 for(CPPL_INT
i=0;
i<
m;
i++){
15 for( CPPL_INT j=0; j<
n; j++){
28 if(
n!=mat.
n ||
m!=mat.
n){
30 std::cerr <<
"These two matrises can not make a sutraction." << std::endl
31 <<
"Your input was (" <<
m <<
"x" <<
n <<
") -= (" << mat.
n <<
"x" << mat.
n <<
")." << std::endl;
36 for(CPPL_INT
i=0;
i<
m;
i++){
37 for(CPPL_INT j=0; j<
n; j++){
52 std::cerr <<
"These two matrises can not make a product." << std::endl
53 <<
"Your input was (" <<
m <<
"x" <<
n <<
") *= (" << mat.
n <<
"x" << mat.
n <<
")." << std::endl;
61 comple alpha =comple(1.,0.);
62 comple beta =comple(0.,0.);
64 zhemm_( &side, &uplo, &mat.
n, &
n, &alpha, mat.
array, &mat.
n,
array, &
m, &beta, newmat.
array, &newmat.
m );
79 if(matA.
n!=matB.
n || matA.
m!=matB.
n){
81 std::cerr <<
"These two matrises can not make a summation." << std::endl
82 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
89 for(CPPL_INT
i=0;
i<matA.
m;
i++){
90 for(CPPL_INT j=0; j<matA.
n; j++){
91 newmat(
i,j) += matB(
i,j);
101 {CPPL_VERBOSE_REPORT;
103 if(matA.
n!=matB.
n || matA.
m!=matB.
n){
105 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
106 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
113 for(CPPL_INT
i=0;
i<matA.
m;
i++){
114 for(CPPL_INT j=0; j<matA.
n; j++){
115 newmat(
i,j) -= matB(
i,j);
125 {CPPL_VERBOSE_REPORT;
129 std::cerr <<
"These two matrises can not make a product." << std::endl
130 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
138 comple alpha =comple(1.,0.);
139 comple beta =comple(0.,0.);
141 zhemm_( &side, &uplo, &newmat.
m, &newmat.
n, &alpha, matB.
array, &matB.
n, matA.
array, &matA.
m, &beta, newmat.
array, &newmat.
m );
_zgematrix operator+(const zgematrix &matA, const zhematrix &matB)
comple & operator()(const CPPL_INT &, const CPPL_INT &)
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.
CPPL_INT n
matrix column size
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
_zgematrix operator*(const zgematrix &matA, const zhematrix &matB)
_zgematrix operator-(const zgematrix &matA, const zhematrix &matB)
CPPL_INT m
matrix row size
zgematrix & operator+=(const zgematrix &)
friend void swap(zgematrix &, zgematrix &)
Complex Double-precision Hermitian Matrix Class [l-type (UPLO=l) Strage].
_dcovector _(dcovector &vec)