CPPLapack
 All Classes Files Functions Variables Friends Pages
double-small.hpp
Go to the documentation of this file.
1 //=============================================================================
2 /*! double*dcovector_small operator */
3 template<CPPL_INT l>
4 inline dcovector_small<l> operator*(const double& v, const dcovector_small<l>& A)
5 {CPPL_VERBOSE_REPORT;
7  for(CPPL_INT i=0; i<l; i++){
8  X(i) =v*A(i);
9  }
10  return X;
11 }
12 
13 //=============================================================================
14 /*! double*drovector_small operator */
15 template<CPPL_INT l>
16 inline drovector_small<l> operator*(const double& v, const drovector_small<l>& A)
17 {CPPL_VERBOSE_REPORT;
19  for(CPPL_INT i=0; i<l; i++){
20  X(i) =v*A(i);
21  }
22  return X;
23 }
24 
25 //=============================================================================
26 /*! double*dgematrix_small operator */
27 template<CPPL_INT m, CPPL_INT n>
28 inline dgematrix_small<m,n> operator*(const double& v, const dgematrix_small<m,n>& A)
29 {CPPL_VERBOSE_REPORT;
31  for(CPPL_INT i=0; i<m; i++){
32  for(CPPL_INT j=0; j<n; j++){
33  C(i,j) =v*A(i,j);
34  }
35  }
36  return C;
37 }
38 
39 //=============================================================================
40 /*! double*dsymatrix_small operator */
41 template<CPPL_INT n>
42 inline dsymatrix_small<n> operator*(const double& v, const dsymatrix_small<n>& A)
43 {CPPL_VERBOSE_REPORT;
45  for(CPPL_INT k=0; k<(n*(n+1))/2; k++){
46  X.array[k] =v*A.array[k];
47  }
48  return X;
49 }
50 
51 ///////////////////////////////////////////////////////////////////////////////
52 ///////////////////////////////////////////////////////////////////////////////
53 ///////////////////////////////////////////////////////////////////////////////
54 
55 //=============================================================================
56 /*! double*zcovector_small operator */
57 template<CPPL_INT l>
58 inline zcovector_small<l> operator*(const double& v, const zcovector_small<l>& A)
59 {CPPL_VERBOSE_REPORT;
61  for(CPPL_INT i=0; i<l; i++){
62  X(i) =v*A(i);
63  }
64  return X;
65 }
66 
67 //=============================================================================
68 /*! double*zrovector_small operator */
69 template<CPPL_INT l>
70 inline zrovector_small<l> operator*(const double& v, const zrovector_small<l>& A)
71 {CPPL_VERBOSE_REPORT;
73  for(CPPL_INT i=0; i<l; i++){
74  X(i) =v*A(i);
75  }
76  return X;
77 }
78 
79 //=============================================================================
80 /*! double*zgematrix_small operator */
81 template<CPPL_INT m, CPPL_INT n>
82 inline zgematrix_small<m,n> operator*(const double& v, const zgematrix_small<m,n>& A)
83 {CPPL_VERBOSE_REPORT;
85  for(CPPL_INT i=0; i<m; i++){
86  for(CPPL_INT j=0; j<n; j++){
87  C(i,j) =v*A(i,j);
88  }
89  }
90  return C;
91 }
92 
93 //=============================================================================
94 /*! double*zhematrix_small operator */
95 template<CPPL_INT n>
96 inline zhematrix_small<n> operator*(const double& v, const zhematrix_small<n>& A)
97 {CPPL_VERBOSE_REPORT;
99  for(CPPL_INT k=0; k<(n*(n+1))/2; k++){
100  X.array[k] =v*A.array[k];
101  }
102  return X;
103 }
comple array[(n *(n+1))/2]
Samll Real Double-precision Symmetric Matrix Class.
Samll Real Double-precision General Dence Matrix Class.
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.
Samll Complex Double-precision Row Vector Class.
Samll Real Double-precision Row Vector Class.
dcovector_small< l > operator*(const double &v, const dcovector_small< l > &A)
Definition: double-small.hpp:4
Samll Real Double-precision Column Vector Class.
Samll Complex Double-precision General Dence Matrix Class.
Samll Complex Double-precision Symmetric Matrix Class.
double array[(n *(n+1))/2]
1D array to store vector data