Go to the source code of this file.
Functions | |
_zgematrix | operator+ (const zgematrix &matA, const zhematrix &matB) |
_zgematrix | operator- (const zgematrix &matA, const zhematrix &matB) |
_zgematrix | operator* (const zgematrix &matA, const zhematrix &matB) |
_zgematrix operator+ | ( | const zgematrix & | matA, |
const zhematrix & | matB | ||
) | [inline] |
zgematrix+zhematrix operator
Definition at line 69 of file zgematrix-zhematrix.hpp.
References _(), i(), zgematrix::m, zgematrix::n, and zhematrix::n.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.n){ ERROR_REPORT; std::cerr << "These two matrises can not make a summation." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") + (" << matB.n << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zgematrix newmat(matA); for(long i=0; i<matA.m; i++){ for(long j=0; j<matA.n; j++){ newmat(i,j) += matB(i,j); }} return _(newmat); }
_zgematrix operator- | ( | const zgematrix & | matA, |
const zhematrix & | matB | ||
) | [inline] |
zgematrix-zhematrix operator
Definition at line 90 of file zgematrix-zhematrix.hpp.
References _(), i(), zgematrix::m, zgematrix::n, and zhematrix::n.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.n){ ERROR_REPORT; std::cerr << "These two matrises can not make a subtraction." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") - (" << matB.n << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zgematrix newmat(matA); for(long i=0; i<matA.m; i++){ for(long j=0; j<matA.n; j++){ newmat(i,j) -= matB(i,j); }} return _(newmat); }
_zgematrix operator* | ( | const zgematrix & | matA, |
const zhematrix & | matB | ||
) | [inline] |
zgematrix*zhematrix operator
Definition at line 111 of file zgematrix-zhematrix.hpp.
References _(), zgematrix::array, zhematrix::array, zgematrix::m, zgematrix::n, and zhematrix::n.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n){ ERROR_REPORT; std::cerr << "These two matrises can not make a product." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") * (" << matB.n << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zgematrix newmat( matA.m, matA.n ); zhemm_( 'R', 'l', newmat.m, newmat.n, comple(1.0,0.0), matB.array, newmat.n, matA.array, newmat.m, comple(0.0,0.0), newmat.array, newmat.m ); return _(newmat); }