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