00001
00003 inline _zgematrix operator*(const zhematrix& mat, const std::complex<double>& d)
00004 {
00005 #ifdef CPPL_VERBOSE
00006 std::cerr << "# [MARK] operator*(const zhematrix&, const std::complex<double>&)"
00007 << std::endl;
00008 #endif//CPPL_VERBOSE
00009
00010 mat.complete();
00011 zgematrix newmat(mat.N, mat.N);
00012 for(long i=0; i<mat.N*mat.N; i++){ newmat.array[i] =mat.Array[i]*d; }
00013
00014 return _(newmat);
00015 }
00016
00017
00019 inline _zgematrix operator/(const zhematrix& mat, const std::complex<double>& d)
00020 {
00021 #ifdef CPPL_VERBOSE
00022 std::cerr << "# [MARK] operator/(const zhematrix&, const std::complex<double>&)"
00023 << std::endl;
00024 #endif//CPPL_VERBOSE
00025
00026 std::complex<double> inv_d(1./d);
00027
00028 mat.complete();
00029 zgematrix newmat(mat.N, mat.N);
00030 for(long i=0; i<mat.N*mat.N; i++){ newmat.array[i] =mat.Array[i]*inv_d; }
00031
00032 return _(newmat);
00033 }