00001
00003 inline zssmatrix& zssmatrix::operator*=(const std::complex<double>& d)
00004 {
00005 #ifdef CPPL_VERBOSE
00006 std::cerr << "# [MARK] zssmatrix::operator*=(const std::complex<double>&)"
00007 << std::endl;
00008 #endif//CPPL_VERBOSE
00009
00010 zscal_(VOL, d, Array, 1);
00011 return *this;
00012 }
00013
00014
00016 inline zssmatrix& zssmatrix::operator/=(const std::complex<double>& d)
00017 {
00018 #ifdef CPPL_VERBOSE
00019 std::cerr << "# [MARK] zssmatrix::operator/=(const std::complex<double>&)"
00020 << std::endl;
00021 #endif//CPPL_VERBOSE
00022
00023 zscal_(VOL, 1./d, Array, 1);
00024 return *this;
00025 }
00026
00030
00031
00033 inline _zssmatrix operator*(const zssmatrix& mat, const std::complex<double>& d)
00034 {
00035 #ifdef CPPL_VERBOSE
00036 std::cerr << "# [MARK] operator*(const zssmatrix&, const std::complex<double>&)"
00037 << std::endl;
00038 #endif//CPPL_VERBOSE
00039
00040 zssmatrix newmat(mat.M, mat.N, mat.CAP);
00041
00042 for(long c=0; c<mat.VOL; c++){
00043 newmat.fput(mat.Indx[c], mat.Jndx[c], mat.Array[c]*d);
00044 }
00045
00046 return _(newmat);
00047 }
00048
00049
00051 inline _zssmatrix operator/(const zssmatrix& mat, const std::complex<double>& d)
00052 {
00053 #ifdef CPPL_VERBOSE
00054 std::cerr << "# [MARK] operator/(const zssmatrix&, const std::complex<double>&)"
00055 << std::endl;
00056 #endif//CPPL_VERBOSE
00057
00058 std::complex<double> inv_d(1./d);
00059 zssmatrix newmat(mat.M, mat.N, mat.CAP);
00060
00061 for(long c=0; c<mat.VOL; c++){
00062 newmat.fput(mat.Indx[c], mat.Jndx[c], mat.Array[c]*inv_d);
00063 }
00064
00065 return _(newmat);
00066 }