00001
00003 inline zrovector& zrovector::operator*=(const double& d)
00004 {
00005 #ifdef CPPL_VERBOSE
00006 std::cerr << "# [MARK] zrovector::operator*=(const double&)"
00007 << std::endl;
00008 #endif//CPPL_VERBOSE
00009
00010 zdscal_(L, d, Array, 1);
00011 return *this;
00012 }
00013
00014
00016 inline zrovector& zrovector::operator/=(const double& d)
00017 {
00018 #ifdef CPPL_VERBOSE
00019 std::cerr << "# [MARK] zrovector::operator/=(const double&)"
00020 << std::endl;
00021 #endif//CPPL_VERBOSE
00022
00023 zdscal_(L, 1./d, Array, 1);
00024 return *this;
00025 }
00026
00030
00031
00033 inline _zrovector operator*(const zrovector& vec, const double& d)
00034 {
00035 #ifdef CPPL_VERBOSE
00036 std::cerr << "# [MARK] operator*(const zrovector&, const double&)"
00037 << std::endl;
00038 #endif//CPPL_VERBOSE
00039
00040 zrovector newvec(vec.L);
00041 for(long i=0; i<vec.L; i++){ newvec.array[i] =vec.Array[i]*d; }
00042
00043 return _(newvec);
00044 }
00045
00046
00048 inline _zrovector operator/(const zrovector& vec, const double& d)
00049 {
00050 #ifdef CPPL_VERBOSE
00051 std::cerr << "# [MARK] operator/(const zrovector&, const double&)"
00052 << std::endl;
00053 #endif//CPPL_VERBOSE
00054
00055 double inv_d(1./d);
00056 zrovector newvec(vec.L);
00057 for(long i=0; i<vec.L; i++){ newvec.array[i] =vec.Array[i]*inv_d; }
00058
00059 return _(newvec);
00060 }