CPPLapack
 All Classes Files Functions Variables Friends Pages
zrovector-double.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! zrovector*=double operator */
3 inline zrovector& zrovector::operator*=(const double& d)
4 {CPPL_VERBOSE_REPORT;
5  CPPL_INT inc =1;
6  zdscal_(&l, &d, array, &inc);
7  return *this;
8 }
9 
10 //=============================================================================
11 /*! zrovector/=double operator */
12 inline zrovector& zrovector::operator/=(const double& d)
13 {CPPL_VERBOSE_REPORT;
14  double dinv =1./d;
15  CPPL_INT inc =1;
16  zdscal_(&l, &dinv, array, &inc);
17  return *this;
18 }
19 
20 ///////////////////////////////////////////////////////////////////////////////
21 ///////////////////////////////////////////////////////////////////////////////
22 ///////////////////////////////////////////////////////////////////////////////
23 
24 //=============================================================================
25 /*! zrovector*double operator */
26 inline _zrovector operator*(const zrovector& vec, const double& d)
27 {CPPL_VERBOSE_REPORT;
28  zrovector newvec(vec.l);
29 
30  for(CPPL_INT i=0; i<vec.l; i++){
31  newvec.array[i] =vec.array[i]*d;
32  }
33 
34  return _(newvec);
35 }
36 
37 //=============================================================================
38 /*! zrovector/double operator */
39 inline _zrovector operator/(const zrovector& vec, const double& d)
40 {CPPL_VERBOSE_REPORT;
41  zrovector newvec(vec.l);
42 
43  for(CPPL_INT i=0; i<vec.l; i++){
44  newvec.array[i] =vec.array[i]/d;
45  }
46 
47  return _(newvec);
48 }
CPPL_INT l
vector size
Definition: zrovector.hpp:9
_zrovector operator/(const zrovector &vec, const double &d)
_zrovector operator*(const zrovector &vec, const double &d)
_dgematrix i(const _dgbmatrix &mat)
Complex Double-precision Row Vector Class.
Definition: zrovector.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision Row Vector Class
Definition: _zrovector.hpp:3
zrovector & operator*=(const double &)
zrovector & operator/=(const double &)
_dcovector _(dcovector &vec)
comple * array
1D array to store vector data
Definition: zrovector.hpp:10