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