CPPLapack
 All Classes Files Functions Variables Friends
zhsmatrix-_zhematrix.hpp
Go to the documentation of this file.
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   matB.destroy();
00021   return _(newmat);
00022 }
00023 */
00024 
00025 //=============================================================================
00026 /*! zhsmatrix-_zhematrix operator */
00027 /*
00028 inline _zgematrix operator-(const zhsmatrix& matA, const _zhematrix& matB)
00029 {VERBOSE_REPORT;
00030 #ifdef  CPPL_DEBUG
00031   if(matA.m!=matB.n || matA.n!=matB.n){
00032     ERROR_REPORT;
00033     std::cerr << "These two matrises can not make a subtraction." << std::endl
00034               << "Your input was (" << matA.m << "x" << matA.n << ") - (" << matB.n << "x" << matB.n << ")." << std::endl;
00035     exit(1);
00036   }
00037 #endif//CPPL_DEBUG
00038   
00039   zgematrix newmat(-matB);
00040   
00041   for(long c=0; c<matA.vol; c++){
00042     newmat(matA.indx[c],matA.jndx[c]) += matA.array[c];
00043   }
00044   
00045   matB.destroy();
00046   return _(newmat);
00047 }
00048 */
00049 
00050 //=============================================================================
00051 /*! zhsmatrix*_zhematrix operator */
00052 /*
00053 inline _zgematrix operator*(const zhsmatrix& matA, const _zhematrix& matB)
00054 {VERBOSE_REPORT;
00055 #ifdef  CPPL_DEBUG
00056   if(matA.n!=matB.n){
00057     ERROR_REPORT;
00058     std::cerr << "These two matrises can not make a product." << std::endl
00059               << "Your input was (" << matA.m << "x" << matA.n << ") * (" << matB.n << "x" << matB.n << ")." << std::endl;
00060     exit(1);
00061   }
00062 #endif//CPPL_DEBUG
00063   
00064   zgematrix newmat(matA.m, matB.n);
00065   newmat.zero();
00066   
00067   for(long c=0; c<matA.vol; c++){
00068     for(long i=0; i<matB.n; i++){
00069       newmat(matA.indx[c],i) += matA.array[c]*matB(matA.jndx[c],i);
00070     }
00071   }
00072   
00073   matB.destroy();
00074   return _(newmat);
00075 }
00076 */
 All Classes Files Functions Variables Friends