00001 //============================================================================= 00002 /*! zhsmatrix+zhematrix operator */ 00003 /* 00004 inline _zgematrix operator+(const zhsmatrix& matA, const zhematrix& matB) 00005 {VERBOSE_REPORT; 00006 #ifdef CPPL_DEBUG 00007 if(matA.m!=matB.n || matA.n!=matB.n){ 00008 ERROR_REPORT; 00009 std::cerr << "These two matrises can not make a summation." << std::endl 00010 << "Your input was (" << matA.m << "x" << matA.n << ") + (" << matB.n << "x" << matB.n << ")." << std::endl; 00011 exit(1); 00012 } 00013 #endif//CPPL_DEBUG 00014 00015 zgematrix newmat(matB); 00016 for(long c=0; c<matA.vol; c++){ 00017 newmat(matA.indx[c],matA.jndx[c]) += matA.array[c]; 00018 } 00019 00020 return _(newmat); 00021 } 00022 */ 00023 //============================================================================= 00024 /*! zhsmatrix-zhematrix operator */ 00025 /* 00026 inline _zgematrix operator-(const zhsmatrix& matA, const zhematrix& matB) 00027 {VERBOSE_REPORT; 00028 #ifdef CPPL_DEBUG 00029 if(matA.m!=matB.n || matA.n!=matB.n){ 00030 ERROR_REPORT; 00031 std::cerr << "These two matrises can not make a subtraction." << std::endl 00032 << "Your input was (" << matA.m << "x" << matA.n << ") - (" << matB.n << "x" << matB.n << ")." << std::endl; 00033 exit(1); 00034 } 00035 #endif//CPPL_DEBUG 00036 00037 //// shallow copy to zgematrix //// 00038 zgematrix newmat(-matB); 00039 00040 //// add //// 00041 for(long c=0; c<matA.vol; c++){ 00042 newmat(matA.indx[c],matA.jndx[c]) += matA.array[c]; 00043 } 00044 00045 return _(newmat); 00046 } 00047 */ 00048 //============================================================================= 00049 /*! zhsmatrix*zhematrix operator */ 00050 /* 00051 inline _zgematrix operator*(const zhsmatrix& matA, const zhematrix& matB) 00052 {VERBOSE_REPORT; 00053 #ifdef CPPL_DEBUG 00054 if(matA.n!=matB.n){ 00055 ERROR_REPORT; 00056 std::cerr << "These two matrises can not make a product." << std::endl 00057 << "Your input was (" << matA.m << "x" << matA.n << ") * (" << matB.n << "x" << matB.n << ")." << std::endl; 00058 exit(1); 00059 } 00060 #endif//CPPL_DEBUG 00061 00062 zgematrix newmat(matA.m, matB.n); 00063 newmat.zero(); 00064 00065 for(long c=0; c<matA.vol; c++){ 00066 for(long i=0; i<matB.n; i++){ 00067 newmat(matA.indx[c],i) += matA.array[c]*matB(matA.jndx[c],i); 00068 } 00069 } 00070 00071 return _(newmat); 00072 } 00073 */