CPPLapack
 All Classes Files Functions Variables Friends Pages
zhsmatrix-double.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! zhsmatrix*=double operator */
3 inline zhsmatrix& zhsmatrix::operator*=(const double& d)
4 {CPPL_VERBOSE_REPORT;
5  const std::vector<zcomponent>::iterator data_end =data.end();
6  for(std::vector<zcomponent>::iterator it=data.begin(); it!=data_end; it++){
7  it->v *=d;
8  }
9 
10  return *this;
11 }
12 
13 //=============================================================================
14 /*! zhsmatrix/=double operator */
15 inline zhsmatrix& zhsmatrix::operator/=(const double& d)
16 {CPPL_VERBOSE_REPORT;
17  const std::vector<zcomponent>::iterator data_end =data.end();
18  for(std::vector<zcomponent>::iterator it=data.begin(); it!=data_end; it++){
19  it->v /=d;
20  }
21 
22  return *this;
23 }
24 
25 ///////////////////////////////////////////////////////////////////////////////
26 ///////////////////////////////////////////////////////////////////////////////
27 ///////////////////////////////////////////////////////////////////////////////
28 
29 //=============================================================================
30 /*! zhsmatrix*double operator */
31 inline _zhsmatrix operator*(const zhsmatrix& mat, const double& d)
32 {CPPL_VERBOSE_REPORT;
33  zhsmatrix newmat(mat);
34 
35  const std::vector<zcomponent>::iterator newmat_data_end =newmat.data.end();
36  for(std::vector<zcomponent>::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){
37  it->v *=d;
38  }
39 
40  return _(newmat);
41 }
42 
43 //=============================================================================
44 /*! zhsmatrix/double operator */
45 inline _zhsmatrix operator/(const zhsmatrix& mat, const double& d)
46 {CPPL_VERBOSE_REPORT;
47  zhsmatrix newmat(mat);
48 
49  const std::vector<zcomponent>::iterator newmat_data_end =newmat.data.end();
50  for(std::vector<zcomponent>::iterator it=newmat.data.begin(); it!=newmat_data_end; it++){
51  it->v /=d;
52  }
53 
54  return _(newmat);
55 }
_zhsmatrix operator*(const zhsmatrix &mat, const double &d)
_zhsmatrix operator/(const zhsmatrix &mat, const double &d)
std::vector< zcomponent > data
matrix data
Definition: zhsmatrix.hpp:11
Complex Double-precision Hermitian Sparse Matrix Class.
Definition: zhsmatrix.hpp:3
zhsmatrix & operator/=(const double &)
_dcovector _(dcovector &vec)
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Sparse Matrix Class ...
Definition: _zhsmatrix.hpp:3
zhsmatrix & operator*=(const double &)