Go to the source code of this file.
Functions | |
_zhsmatrix | operator+ (const _zhsmatrix &matA, const _zhsmatrix &matB) |
_zhsmatrix | operator- (const _zhsmatrix &matA, const _zhsmatrix &matB) |
_zhsmatrix operator+ | ( | const _zhsmatrix & | matA, |
const _zhsmatrix & | matB | ||
) | [inline] |
_zhsmatrix+_zhsmatrix operator
Definition at line 3 of file _zhsmatrix-_zhsmatrix.hpp.
References _(), _zhsmatrix::data, _zhsmatrix::destroy(), and _zhsmatrix::n.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n){ ERROR_REPORT; std::cerr << "These two matrises can not make a summation." << std::endl << "Your input was (" << matA.n << "x" << matA.n << ") + (" << matB.n << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zhsmatrix newmat(matA); for(std::vector<zcomponent>::const_iterator it=matB.data.begin(); it!=matB.data.end(); it++){ newmat(it->i,it->j) +=it->v; } matB.destroy(); return _(newmat); }
_zhsmatrix operator- | ( | const _zhsmatrix & | matA, |
const _zhsmatrix & | matB | ||
) | [inline] |
_zhsmatrix-_zhsmatrix operator
Definition at line 26 of file _zhsmatrix-_zhsmatrix.hpp.
References _(), _zhsmatrix::data, _zhsmatrix::destroy(), and _zhsmatrix::n.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n){ ERROR_REPORT; std::cerr << "These two matrises can not make a subtraction." << std::endl << "Your input was (" << matA.n << "x" << matA.n << ") - (" << matB.n << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zhsmatrix newmat(matA); for(std::vector<zcomponent>::const_iterator it=matB.data.begin(); it!=matB.data.end(); it++){ newmat(it->i,it->j) -=it->v; } matB.destroy(); return _(newmat); }