6 if(matA.
m!=matB.
m || matA.
n!=matB.
n){
8 std::cerr <<
"These two matrises can not make a summation." << std::endl
9 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
16 const size_t matB_data_size =matB.
data.size();
17 for(
size_t c=0; c<matB_data_size; c++){
19 newmat(z.
i,z.
j) += z.
v;
30 if(matA.
m!=matB.
m || matA.
n!=matB.
n){
32 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
33 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
40 const size_t matB_data_size =matB.
data.size();
41 for(
size_t c=0; c<matB_data_size; c++){
43 newmat(z.
i,z.
j) -= z.
v;
56 std::cerr <<
"These two matrises can not make a product." << std::endl
57 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
n <<
"x" << matB.
n <<
")." << std::endl;
65 const size_t matB_data_size =matB.
data.size();
66 for(
size_t c=0; c<matB_data_size; c++){
68 for(CPPL_INT
i=0;
i<matA.
m;
i++){
69 newmat(
i,z.
j) += matA(
i,z.
i)*z.
v;
comple v
value of the component
Complex Double-precision General Sparse Matrix Class.
_zgematrix operator-(const zgematrix &matA, const zgsmatrix &matB)
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
_zgematrix operator+(const zgematrix &matA, const zgsmatrix &matB)
Complex Double-precision General Dence Matrix Class.
std::vector< zcomponent > data
matrix data
Component Class for Complex Double-precision Sparse Matrix Classes.
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
CPPL_INT j
j index of the component
CPPL_INT i
i index of the component
CPPL_INT m
matrix row size
_zgematrix operator*(const zgematrix &matA, const zgsmatrix &matB)
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)