CPPLapack
|
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class More...
#include <_zgematrix.hpp>
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition at line 3 of file _zgematrix.hpp.
_zgematrix::_zgematrix | ( | ) | [inline] |
_zgematrix::_zgematrix | ( | const _zgematrix & | mat | ) | [inline] |
_zgematrix::~_zgematrix | ( | ) | [inline] |
comple & _zgematrix::operator() | ( | const long & | i, |
const long & | j | ||
) | const [inline] |
void _zgematrix::write | ( | const char * | filename | ) | const [inline] |
Definition at line 41 of file _zgematrix-io.hpp.
References destroy(), i, m, n, and operator()().
{VERBOSE_REPORT; std::ofstream ofs(filename, std::ios::trunc); ofs.setf(std::cout.flags()); ofs.precision(std::cout.precision()); ofs.width(std::cout.width()); ofs.fill(std::cout.fill()); ofs << "#zgematrix" << " " << m << " " << n << std::endl; for(long i=0; i<m; i++){ for(long j=0; j<n; j++){ ofs << operator()(i,j) << " "; } ofs << std::endl; } ofs.close(); destroy(); }
void _zgematrix::nullify | ( | ) | const [inline] |
nullify all the matrix data
Definition at line 3 of file _zgematrix-misc.hpp.
References array, darray, m, and n.
Referenced by _zgematrix(), zgematrix::shallow_copy(), and zgematrix::zgematrix().
void _zgematrix::destroy | ( | ) | const [inline] |
destroy all the matrix data
Definition at line 13 of file _zgematrix-misc.hpp.
Referenced by conjt(), damax(), idamax(), operator*(), zgematrix::operator*=(), operator+(), zgematrix::operator+=(), operator-(), zgematrix::operator-=(), operator<<(), t(), and write().
std::ostream& operator<< | ( | std::ostream & | s, |
const zgematrix & | mat | ||
) | [friend] |
_zgematrix t | ( | const _zgematrix & | mat | ) | [friend] |
_zgematrix i | ( | const _zgematrix & | mat | ) | [friend] |
return its inverse matrix
Definition at line 19 of file _zgematrix-calc.hpp.
Referenced by operator()(), and write().
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(mat.m!=mat.n){ ERROR_REPORT; std::cerr << "This matrix is not square and has no inverse matrix." << std::endl << "Your input was (" << mat.m << "x" << mat.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zgematrix mat_cp(mat); zgematrix mat_inv(mat_cp.m,mat_cp.n); mat_inv.identity(); mat_cp.zgesv(mat_inv); return _(mat_inv); }
_zgematrix conj | ( | const _zgematrix & | mat | ) | [friend] |
_zgematrix conjt | ( | const _zgematrix & | mat | ) | [friend] |
void idamax | ( | long & | i, |
long & | j, | ||
const _zgematrix & | mat | ||
) | [friend] |
comple damax | ( | const _zgematrix & | mat | ) | [friend] |
const _zgematrix& operator+ | ( | const _zgematrix & | mat | ) | [friend] |
+_zgematrix operator
Definition at line 3 of file _zgematrix-unary.hpp.
{VERBOSE_REPORT;
return mat;
}
_zgematrix operator- | ( | const _zgematrix & | mat | ) | [friend] |
_zgematrix operator+ | ( | const _zgematrix & | matA, |
const zgematrix & | matB | ||
) | [friend] |
_zgematrix+zgematrix operator
Definition at line 3 of file _zgematrix-zgematrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a summation." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(long i=0; i<matA.m*matA.n; i++){ matA.array[i]+=matB.array[i]; } return matA; }
_zgematrix operator+ | ( | const _zgematrix & | matA, |
const _zgematrix & | matB | ||
) | [friend] |
_zgematrix+_zgematrix operator
Definition at line 3 of file _zgematrix-_zgematrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a summation." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(long i=0; i<matA.m*matA.n; i++){ matA.array[i]+=matB.array[i]; } matB.destroy(); return matA; }
_zgematrix operator+ | ( | const _zgematrix & | matA, |
const zhematrix & | matB | ||
) | [friend] |
_zgematrix+zhematrix operator
Definition at line 3 of file _zgematrix-zhematrix.hpp.
{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 for(long i=0; i<matB.n; i++){ for(long j=0; j<matB.n; j++){ matA(i,j)+=matB(i,j); } } return matA; }
_zgematrix operator+ | ( | const _zgematrix & | matA, |
const _zhematrix & | matB | ||
) | [friend] |
_zgematrix+_zhematrix operator
Definition at line 3 of file _zgematrix-_zhematrix.hpp.
{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 for(long i=0; i<matB.n; i++){ for(long j=0; j<matB.n; j++){ matA(i,j)+=matB(i,j); }} matB.destroy(); return matA; }
_zgematrix operator+ | ( | const _zgematrix & | matA, |
const zgbmatrix & | matB | ||
) | [friend] |
_zgematrix+zgbmatrix operator
Definition at line 3 of file _zgematrix-zgbmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a summation." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(long i=0; i<matB.m; i++){ for(long j=std::max(long(0),i-matB.kl); j<std::min(matB.n,i+matB.ku+1); j++){ matA(i,j)+=matB(i,j); } } return matA; }
_zgematrix operator+ | ( | const _zgematrix & | matA, |
const _zgbmatrix & | matB | ||
) | [friend] |
_zgematrix+_zgbmatrix operator
Definition at line 3 of file _zgematrix-_zgbmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a summation." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(long i=0; i<matB.m; i++){ for(long j=std::max(long(0),i-matB.kl); j<std::min(matB.n,i+matB.ku+1); j++){ matA(i,j)+=matB(i,j); } } matB.destroy(); return matA; }
_zgematrix operator+ | ( | const _zgematrix & | matA, |
const zgsmatrix & | matB | ||
) | [friend] |
_zgematrix+zgsmatrix operator
Definition at line 3 of file _zgematrix-zgsmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.m!=matB.m || matA.n!=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.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(size_t c=0; c<matB.data.size(); c++){ const zcomponent& z =matB.data[c]; matA(z.i,z.j) += z.v; } return matA; }
_zgematrix operator+ | ( | const _zgematrix & | matA, |
const _zgsmatrix & | matB | ||
) | [friend] |
_zgematrix+_zgsmatrix operator
Definition at line 3 of file _zgematrix-_zgsmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.m!=matB.m || matA.n!=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.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(size_t c=0; c<matB.data.size(); c++){ const zcomponent& z =matB.data[c]; matA(z.i,z.j) += z.v; } matB.destroy(); return matA; }
_zgematrix operator+ | ( | const _zgematrix & | , |
const zhsmatrix & | |||
) | [friend] |
_zgematrix operator+ | ( | const _zgematrix & | , |
const _zhsmatrix & | |||
) | [friend] |
_zgematrix operator- | ( | const _zgematrix & | matA, |
const zgematrix & | matB | ||
) | [friend] |
_zgematrix-zgematrix operator
Definition at line 21 of file _zgematrix-zgematrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a subtraction." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") - (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(long i=0; i<matA.m*matA.n; i++){ matA.array[i]-=matB.array[i]; } return matA; }
_zgematrix operator- | ( | const _zgematrix & | matA, |
const _zgematrix & | matB | ||
) | [friend] |
_zgematrix-_zgematrix operator
Definition at line 22 of file _zgematrix-_zgematrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a subtraction." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") - (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(long i=0; i<matA.m*matA.n; i++){ matA.array[i]-=matB.array[i]; } matB.destroy(); return matA; }
_zgematrix operator- | ( | const _zgematrix & | matA, |
const zhematrix & | matB | ||
) | [friend] |
_zgematrix-zhematrix operator
Definition at line 25 of file _zgematrix-zhematrix.hpp.
{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 for(long i=0; i<matB.n; i++){ for(long j=0; j<matB.n; j++){ matA(i,j)-=matB(i,j); } } return matA; }
_zgematrix operator- | ( | const _zgematrix & | matA, |
const _zhematrix & | matB | ||
) | [friend] |
_zgematrix-_zhematrix operator
Definition at line 24 of file _zgematrix-_zhematrix.hpp.
{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 for(long i=0; i<matB.n; i++){ for(long j=0; j<matB.n; j++){ matA(i,j)-=matB(i,j); }} matB.destroy(); return matA; }
_zgematrix operator- | ( | const _zgematrix & | matA, |
const zgbmatrix & | matB | ||
) | [friend] |
_zgematrix-zgbmatrix operator
Definition at line 25 of file _zgematrix-zgbmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a summation." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(long i=0; i<matB.m; i++){ for(long j=std::max(long(0),i-matB.kl); j<std::min(matB.n,i+matB.ku+1); j++){ matA(i,j)-=matB(i,j); } } return matA; }
_zgematrix operator- | ( | const _zgematrix & | matA, |
const _zgbmatrix & | matB | ||
) | [friend] |
_zgematrix-_zgbmatrix operator
Definition at line 26 of file _zgematrix-_zgbmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.n || matA.m!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a summation." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") + (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG for(long i=0; i<matB.m; i++){ for(long j=std::max(long(0),i-matB.kl); j<std::min(matB.n,i+matB.ku+1); j++){ matA(i,j)-=matB(i,j); } } matB.destroy(); return matA; }
_zgematrix operator- | ( | const _zgematrix & | matA, |
const zgsmatrix & | matB | ||
) | [friend] |
_zgematrix-zgsmatrix operator
Definition at line 24 of file _zgematrix-zgsmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.m!=matB.m || matA.n!=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 for(size_t c=0; c<matB.data.size(); c++){ const zcomponent& z =matB.data[c]; matA(z.i,z.j) -= z.v; } return matA; }
_zgematrix operator- | ( | const _zgematrix & | matA, |
const _zgsmatrix & | matB | ||
) | [friend] |
_zgematrix-_zgsmatrix operator
Definition at line 25 of file _zgematrix-_zgsmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.m!=matB.m || matA.n!=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 for(size_t c=0; c<matB.data.size(); c++){ const zcomponent& z =matB.data[c]; matA(z.i,z.j) -= z.v; } matB.destroy(); return matA; }
_zgematrix operator- | ( | const _zgematrix & | , |
const zhsmatrix & | |||
) | [friend] |
_zgematrix operator- | ( | const _zgematrix & | , |
const _zhsmatrix & | |||
) | [friend] |
_zcovector operator* | ( | const _zgematrix & | mat, |
const zcovector & | vec | ||
) | [friend] |
_zgematrix*zcovector operator
Definition at line 3 of file _zgematrix-zcovector.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(mat.n!=vec.l){ ERROR_REPORT; std::cerr << "These matrix and vector can not make a product." << std::endl << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zcovector newvec(mat.m); zgemv_( 'n', mat.m, mat.n, comple(1.0,0.0), mat.array, mat.m, vec.array, 1, comple(0.0,0.0), newvec.array, 1 ); mat.destroy(); return _(newvec); }
_zcovector operator* | ( | const _zgematrix & | mat, |
const _zcovector & | vec | ||
) | [friend] |
_zgematrix*_zcovector operator
Definition at line 3 of file _zgematrix-_zcovector.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(mat.n!=vec.l){ ERROR_REPORT; std::cerr << "These matrix and vector can not make a product." << std::endl << "Your input was (" << mat.m << "x" << mat.n << ") * (" << vec.l << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zcovector newvec(mat.m); zgemv_( 'n', mat.m, mat.n, comple(1.0,0.0), mat.array, mat.m, vec.array, 1, comple(0.0,0.0), newvec.array, 1 ); mat.destroy(); vec.destroy(); return _(newvec); }
_zgematrix operator* | ( | const _zgematrix & | matA, |
const zgematrix & | matB | ||
) | [friend] |
_zgematrix*zgematrix operator
Definition at line 39 of file _zgematrix-zgematrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a product." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zgematrix newmat( matA.m, matB.n ); zgemm_( 'n', 'n', matA.m, matB.n, matA.n, comple(1.0,0.0), matA.array, matA.m, matB.array, matB.m, comple(0.0,0.0), newmat.array, matA.m ); matA.destroy(); return _(newmat); }
_zgematrix operator* | ( | const _zgematrix & | matA, |
const _zgematrix & | matB | ||
) | [friend] |
_zgematrix*_zgematrix operator
Definition at line 41 of file _zgematrix-_zgematrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a product." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zgematrix newmat( matA.m, matB.n ); zgemm_( 'n', 'n', matA.m, matB.n, matA.n, comple(1.0,0.0), matA.array, matA.m, matB.array, matB.m, comple(0.0,0.0), newmat.array, matA.m ); matA.destroy(); matB.destroy(); return _(newmat); }
_zgematrix operator* | ( | const _zgematrix & | matA, |
const zhematrix & | matB | ||
) | [friend] |
_zgematrix*zhematrix operator
Definition at line 47 of file _zgematrix-zhematrix.hpp.
{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.n, matB.n ); zhemm_( 'R', 'l', matB.n, matA.n, comple(1.0,0.0), matB.array, matB.n, matA.array, matA.m, comple(0.0,0.0), newmat.array, newmat.m ); matA.destroy(); return _(newmat); }
_zgematrix operator* | ( | const _zgematrix & | matA, |
const _zhematrix & | matB | ||
) | [friend] |
_zgematrix*_zhematrix operator
Definition at line 45 of file _zgematrix-_zhematrix.hpp.
{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.n, matB.n ); zhemm_( 'R', 'l', matB.n, matA.n, comple(1.0,0.0), matB.array, matB.n, matA.array, matA.m, comple(0.0,0.0), newmat.array, newmat.m ); matA.destroy(); matB.destroy(); return _(newmat); }
_zgematrix operator* | ( | const _zgematrix & | matA, |
const zgbmatrix & | matB | ||
) | [friend] |
_zgematrix*zgbmatrix operator
Definition at line 47 of file _zgematrix-zgbmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a product." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zgematrix newmat( matA.m, matB.n ); newmat.zero(); for(long i=0; i<newmat.m; i++){ for(long j=0; j<newmat.n; j++){ for(long k=std::max(long(0),j-matB.ku); k<std::min(matB.m,j+matB.kl+1); k++){ newmat(i,j)+=matA(i,k)*matB(k,j); } } } matA.destroy(); return _(newmat); }
_zgematrix operator* | ( | const _zgematrix & | matA, |
const _zgbmatrix & | matB | ||
) | [friend] |
_zgematrix*_zgbmatrix operator
Definition at line 49 of file _zgematrix-_zgbmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.m){ ERROR_REPORT; std::cerr << "These two matrises can not make a product." << std::endl << "Your input was (" << matA.m << "x" << matA.n << ") * (" << matB.m << "x" << matB.n << ")." << std::endl; exit(1); } #endif//CPPL_DEBUG zgematrix newmat( matA.m, matB.n ); newmat.zero(); for(long i=0; i<newmat.m; i++){ for(long j=0; j<newmat.n; j++){ for(long k=std::max(long(0),j-matB.ku); k<std::min(matB.m,j+matB.kl+1); k++){ newmat(i,j)+=matA(i,k)*matB(k,j); } } } matA.destroy(); matB.destroy(); return _(newmat); }
_zgematrix operator* | ( | const _zgematrix & | matA, |
const zgsmatrix & | matB | ||
) | [friend] |
_zgematrix*zgsmatrix operator
Definition at line 45 of file _zgematrix-zgsmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.m){ 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, matB.n); newmat.zero(); for(size_t c=0; c<matB.data.size(); c++){ const zcomponent& z =matB.data[c]; for(long i=0; i<matA.m; i++){ newmat(i,z.j) += matA(i,z.i)*z.v; } } matA.destroy(); return _(newmat); }
_zgematrix operator* | ( | const _zgematrix & | matA, |
const _zgsmatrix & | matB | ||
) | [friend] |
_zgematrix*_zgsmatrix operator
Definition at line 47 of file _zgematrix-_zgsmatrix.hpp.
{VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.n!=matB.m){ 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, matB.n); newmat.zero(); for(size_t c=0; c<matB.data.size(); c++){ const zcomponent& z =matB.data[c]; for(long i=0; i<matA.m; i++){ newmat(i,z.j) += matA(i,z.i)*z.v; } } matA.destroy(); matB.destroy(); return _(newmat); }
_zgematrix operator* | ( | const _zgematrix & | , |
const zhsmatrix & | |||
) | [friend] |
_zgematrix operator* | ( | const _zgematrix & | , |
const _zhsmatrix & | |||
) | [friend] |
_zgematrix operator* | ( | const _zgematrix & | mat, |
const double & | d | ||
) | [friend] |
_zgematrix*double operator
Definition at line 3 of file _zgematrix-double.hpp.
_zgematrix operator* | ( | const _zgematrix & | mat, |
const comple & | d | ||
) | [friend] |
_zgematrix*comple operator
Definition at line 3 of file _zgematrix-complex.hpp.
_zgematrix operator/ | ( | const _zgematrix & | mat, |
const double & | d | ||
) | [friend] |
_zgematrix/double operator
Definition at line 11 of file _zgematrix-double.hpp.
_zgematrix operator/ | ( | const _zgematrix & | mat, |
const comple & | d | ||
) | [friend] |
_zgematrix/comple operator
Definition at line 11 of file _zgematrix-complex.hpp.
_zgematrix operator* | ( | const double & | d, |
const _zgematrix & | mat | ||
) | [friend] |
double*_zgematrix operator
Definition at line 3 of file double-_zgematrix.hpp.
_zgematrix operator* | ( | const comple & | d, |
const _zgematrix & | mat | ||
) | [friend] |
comple*_zgematrix operator
Definition at line 3 of file complex-_zgematrix.hpp.
long _zgematrix::m [mutable] |
matrix row size
Definition at line 9 of file _zgematrix.hpp.
Referenced by _(), _zgematrix(), conj(), conjt(), damax(), i(), idamax(), nullify(), operator()(), operator*(), zgematrix::operator*=(), operator+(), zgematrix::operator+=(), operator-(), zgematrix::operator-=(), operator/(), operator<<(), zgematrix::shallow_copy(), t(), write(), and zgematrix::zgematrix().
long _zgematrix::n [mutable] |
matrix column size
Definition at line 10 of file _zgematrix.hpp.
Referenced by _(), _zgematrix(), conj(), conjt(), damax(), i(), idamax(), nullify(), operator()(), operator*(), zgematrix::operator*=(), operator+(), zgematrix::operator+=(), operator-(), zgematrix::operator-=(), operator/(), operator<<(), zgematrix::shallow_copy(), t(), write(), and zgematrix::zgematrix().
comple* _zgematrix::array [mutable] |
1D array to store matrix data
Definition at line 11 of file _zgematrix.hpp.
Referenced by _(), _zgematrix(), damax(), destroy(), idamax(), nullify(), operator*(), zgematrix::operator*=(), operator+(), zgematrix::operator+=(), operator-(), zgematrix::operator-=(), operator/(), zgematrix::shallow_copy(), zgematrix::zgematrix(), and ~_zgematrix().
comple** _zgematrix::darray [mutable] |
array of pointers of column head addresses
Definition at line 12 of file _zgematrix.hpp.
Referenced by _(), _zgematrix(), destroy(), nullify(), operator()(), zgematrix::shallow_copy(), zgematrix::zgematrix(), and ~_zgematrix().