Go to the source code of this file.
dgsmatrix+_dgematrix operator
Definition at line 3 of file dgsmatrix-_dgematrix.hpp.
References dgsmatrix::data, _dgematrix::m, dgsmatrix::m, dgsmatrix::n, and _dgematrix::n.
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;
14 const std::vector<dcomponent>::const_iterator matA_data_end =matA.
data.end();
15 for(std::vector<dcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
16 matB(it->i,it->j) += it->v;
std::vector< dcomponent > data
matrix data
CPPL_INT n
matrix column size
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
CPPL_INT m
matrix row size
dgsmatrix-_dgematrix operator
Definition at line 24 of file dgsmatrix-_dgematrix.hpp.
References _dgematrix::array, dgsmatrix::data, i(), _dgematrix::m, dgsmatrix::m, dgsmatrix::n, and _dgematrix::n.
27 if(matA.
m!=matB.
m || matA.
n!=matB.
n){
29 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
30 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
36 for(CPPL_INT
i=0;
i<matB.
m*matB.
n;
i++){
41 const std::vector<dcomponent>::const_iterator matA_data_end =matA.
data.end();
42 for(std::vector<dcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
43 matB(it->i,it->j) += it->v;
std::vector< dcomponent > data
matrix data
CPPL_INT n
matrix column size
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT m
matrix row size
double * array
1D array to store matrix data
CPPL_INT n
matrix column size
CPPL_INT m
matrix row size
dgsmatrix*_dgematrix operator
Definition at line 51 of file dgsmatrix-_dgematrix.hpp.
References _(), dgsmatrix::data, _dgematrix::destroy(), dgsmatrix::m, _dgematrix::m, dgsmatrix::n, _dgematrix::n, and dgematrix::zero().
56 std::cerr <<
"These two matrises can not make a product." << std::endl
57 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
65 const std::vector<dcomponent>::const_iterator matA_data_end =matA.
data.end();
66 for(std::vector<dcomponent>::const_iterator it=matA.
data.begin(); it!=matA_data_end; it++){
67 for(CPPL_INT j=0; j<matB.
n; j++){
68 newmat(it->i,j) += it->v *matB(it->j,j);
std::vector< dcomponent > data
matrix data
CPPL_INT n
matrix column size
Real Double-precision General Dence Matrix Class.
CPPL_INT m
matrix row size
CPPL_INT n
matrix column size
_dcovector _(dcovector &vec)
CPPL_INT m
matrix row size