//=============================================================================
/*! dssmatrix+dgbmatrix operator */
/*
inline _dgematrix operator+(const dssmatrix& matA, const dgbmatrix& matB)
{
#ifdef CPPL_VERBOSE
std::cerr << "# [MARK] operator+(const dssmatrix&, const dgbmatrix&)"
<< std::endl;
#endif//CPPL_VERBOSE
#ifdef CPPL_DEBUG
if(matA.N!=matB.N || matA.M!=matB.M){
std::cerr << "[ERROR] operator+(const dssmatrix&, const dgbmatrix&)"
<< std::endl
<< "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
dgematrix newmat(matA);
for(long i=0; i<matB.M; i++){
for(long j=max(0,i-matB.KL); j<min(matB.N,i+matB.KU+1); j++){
newmat(i,j)+=matB(i,j);
}
}
return _(newmat);
}
*/
//=============================================================================
/*! dssmatrix-dgbmatrix operator */
/*
inline _dgematrix operator-(const dssmatrix& matA, const dgbmatrix& matB)
{
#ifdef CPPL_VERBOSE
std::cerr << "# [MARK] operator-(const dssmatrix&, const dgbmatrix&)"
<< std::endl;
#endif//CPPL_VERBOSE
#ifdef CPPL_DEBUG
if(matA.N!=matB.N || matA.M!=matB.M){
std::cerr << "[ERROR] operator+(const dssmatrix&, const dgbmatrix&)"
<< std::endl
<< "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
dgematrix newmat(matA);
for(long i=0; i<matB.M; i++){
for(long j=max(0,i-matB.KL); j<min(matB.N,i+matB.KU+1); j++){
newmat(i,j)-=matB(i,j);
}
}
return _(newmat);
}
*/
//=============================================================================
/*! dssmatrix*dgbmatrix operator */
/*
inline _dgematrix operator*(const dssmatrix& matA, const dgbmatrix& matB)
{
#ifdef CPPL_VERBOSE
std::cerr << "# [MARK] operator*(const dssmatrix&, const dgbmatrix&)"
<< std::endl;
#endif//CPPL_VERBOSE
#ifdef CPPL_DEBUG
if(matA.N!=matB.M){
std::cerr << "[ERROR] operator*(const dssmatrix&, const dgbmatrix&)"
<< std::endl
<< "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
dgematrix newmat( matA.M, matB.N );
newmat.zero();
for(long c=0; c<matA.VOL; c++){
for(long j=max(0,matA.Jndx[c]-matB.KL);
j<min(matB.N,matA.Jndx[c]+matB.KU+1); j++){
newmat(matA.Indx[c],j) += matA.Array[c]*matB(matA.Jndx[c],j);
}
}
return _(newmat);
}
*/