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