Go to the source code of this file.
dgematrix+dgematrix operator
Definition at line 86 of file dgematrix-dgematrix.hpp.
References _(), dgematrix::array, i(), dgematrix::m, and dgematrix::n.
89 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
91 std::cerr <<
"These two matrises can not make a summation." << std::endl
92 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") + (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
99 const CPPL_INT mn =newmat.m*newmat.n;
100 for(CPPL_INT
i=0;
i<mn;
i++){
CPPL_INT m
matrix row size
double * array
1D array to store matrix data
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
Real Double-precision General Dence Matrix Class.
_dcovector _(dcovector &vec)
dgematrix-dgematrix operator
Definition at line 109 of file dgematrix-dgematrix.hpp.
References _(), dgematrix::array, i(), dgematrix::m, and dgematrix::n.
110 {CPPL_VERBOSE_REPORT;
112 if(matA.
n!=matB.
n || matA.
m!=matB.
m){
114 std::cerr <<
"These two matrises can not make a subtraction." << std::endl
115 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") - (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
122 const CPPL_INT mn =newmat.m*newmat.n;
123 for(CPPL_INT
i=0;
i<mn;
i++){
CPPL_INT m
matrix row size
double * array
1D array to store matrix data
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
Real Double-precision General Dence Matrix Class.
_dcovector _(dcovector &vec)
dgematrix*dgematrix operator
Definition at line 132 of file dgematrix-dgematrix.hpp.
References _(), dgematrix::array, dgematrix::m, and dgematrix::n.
133 {CPPL_VERBOSE_REPORT;
137 std::cerr <<
"These two matrises can not make a product." << std::endl
138 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") * (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
149 dgemm_( &transa, &transb, &matA.
m, &matB.
n, &matA.
n, &alpha, matA.
array, &matA.
m, matB.
array, &matB.
m, &beta, newmat.array, &matA.
m );
CPPL_INT m
matrix row size
double * array
1D array to store matrix data
CPPL_INT n
matrix column size
Real Double-precision General Dence Matrix Class.
_dcovector _(dcovector &vec)
dgematrixdgematrix operator
Definition at line 156 of file dgematrix-dgematrix.hpp.
References _(), i(), dgematrix::m, dgematrix::n, and drovector::zero().
157 {CPPL_VERBOSE_REPORT;
159 if(matA.
m!=matB.
m || matA.
n!=matB.
n){
161 std::cerr <<
"These two matrises can not make a product." << std::endl
162 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") % (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
170 for(CPPL_INT j=0; j<matA.
n; j++){
171 for(CPPL_INT
i=0;
i<matA.
m;
i++){
172 newvec(j) +=matA(
i,j)*matB(
i,j);
CPPL_INT m
matrix row size
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
Real Double-precision Row Vector Class.
_dcovector _(dcovector &vec)
return Hadamerd product
Definition at line 185 of file dgematrix-dgematrix.hpp.
References _(), i(), dgematrix::m, and dgematrix::n.
186 {CPPL_VERBOSE_REPORT;
188 if( matA.
m!=matB.
m || matA.
n!=matB.
n ){
190 std::cerr <<
"These two matrices can not make Hadamerd product." << std::endl
191 <<
"Your input was (" << matA.
m <<
"x" << matA.
n <<
") and (" << matB.
m <<
"x" << matB.
n <<
")." << std::endl;
197 for(CPPL_INT
i=0;
i<newmat.
m;
i++){
198 for(CPPL_INT j=0; j<newmat.n; j++){
199 newmat(
i,j) =matA(
i,j)*matB(
i,j);
CPPL_INT m
matrix row size
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
Real Double-precision General Dence Matrix Class.
CPPL_INT m
matrix row size
_dcovector _(dcovector &vec)