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