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