CPPLapack
 All Classes Files Functions Variables Friends Pages
zgematrix.hpp
Go to the documentation of this file.
1 //=============================================================================
2 //! Complex Double-precision General Dence Matrix Class
3 class zgematrix
4 {
5 public:
6  ///////////////////////////////////////////////
7  /////////////////// objects ///////////////////
8  ///////////////////////////////////////////////
9  CPPL_INT m; //!< matrix row size
10  CPPL_INT n; //!< matrix column size
11  comple* array; //!< 1D array to store matrix data
12  comple** darray; //!< array of pointers of column head addresses
13 
14  ///////////////////////////////////////////////
15  ///////////////// constructors ////////////////
16  ///////////////////////////////////////////////
17  inline zgematrix();
18  inline zgematrix(const zgematrix&);
19  inline zgematrix(const _zgematrix&);
20  inline zgematrix(const CPPL_INT&, const CPPL_INT&);
21  inline zgematrix(const char*);
22  inline ~zgematrix(); //destructor
23 
24  ///////////////////////////////////////////////
25  ////////////////// functions //////////////////
26  ///////////////////////////////////////////////
27  //////// cast ////////
28 
29  //////// io ////////
30  inline comple& operator()(const CPPL_INT&, const CPPL_INT&);
31  inline comple operator()(const CPPL_INT&, const CPPL_INT&) const;
32  inline zgematrix& set(const CPPL_INT&, const CPPL_INT&, const comple&);
33  inline friend std::ostream& operator<<(std::ostream&, const zgematrix&);
34  inline void write(const char*) const;
35  inline void read(const char*);
36 
37  //////// misc ////////
38  inline void clear();
39  inline zgematrix& zero();
40  inline zgematrix& identity();
41  inline void chsign();
42  inline void copy(const zgematrix&);
43  inline void shallow_copy(const _zgematrix&);
44  inline void resize(const CPPL_INT&, const CPPL_INT&);
45  inline _zrovector row(const CPPL_INT&) const;
46  inline _zcovector col(const CPPL_INT&) const;
47  inline friend void swap(zgematrix&, zgematrix&);
48  inline friend _zgematrix _(zgematrix&);
49 
50  //////// calc ////////
51  inline friend _zgematrix t(const zgematrix&);
52  inline friend _zgematrix i(const zgematrix&);
53  inline friend _zgematrix conj(const zgematrix&);
54  inline friend _zgematrix conjt(const zgematrix&);
55  inline friend void idamax(CPPL_INT&, CPPL_INT&, const zgematrix&);
56  inline friend comple damax(const zgematrix&);
57 
58  //////// lapack ////////
59  inline CPPL_INT zgesv(zgematrix&);
60  inline CPPL_INT zgesv(zcovector&);
61  inline CPPL_INT zgels(zgematrix&);
62  inline CPPL_INT zgels(zcovector&);
63  inline CPPL_INT zgels(zgematrix&, drovector&);
64  inline CPPL_INT zgels(zcovector&, double&);
65  inline CPPL_INT zgelss(zcovector&, dcovector&, CPPL_INT&, const double);
66  inline CPPL_INT zgelss(zgematrix&, dcovector&, CPPL_INT&, const double);
67  inline CPPL_INT zgeev(std::vector< comple >&);
68  inline CPPL_INT zgeev(std::vector< comple >&, std::vector<zcovector>&);
69  inline CPPL_INT zgeev(std::vector< comple >&, std::vector<zrovector>&);
70  //inline CPPL_INT zgegv()
71  inline CPPL_INT zgesvd(dcovector&, zgematrix&, zgematrix&);
72 
73  ///////////////////////////////////////////////
74  ///////////// numerical operators /////////////
75  ///////////////////////////////////////////////
76  //////// = ////////
77  inline zgematrix& operator=(const zgematrix&);
78  inline zgematrix& operator=(const _zgematrix&);
79 
80  //////// += ////////
81  inline zgematrix& operator+=(const zgematrix&);
82  inline zgematrix& operator+=(const _zgematrix&);
83  inline zgematrix& operator+=(const zhematrix&);
84  inline zgematrix& operator+=(const _zhematrix&);
85  inline zgematrix& operator+=(const zgbmatrix&);
86  inline zgematrix& operator+=(const _zgbmatrix&);
87  inline zgematrix& operator+=(const zgsmatrix&);
88  inline zgematrix& operator+=(const _zgsmatrix&);
89  inline zgematrix& operator+=(const zhsmatrix&);
90  inline zgematrix& operator+=(const _zhsmatrix&);
91 
92  //////// -= ////////
93  inline zgematrix& operator-=(const zgematrix&);
94  inline zgematrix& operator-=(const _zgematrix&);
95  inline zgematrix& operator-=(const zhematrix&);
96  inline zgematrix& operator-=(const _zhematrix&);
97  inline zgematrix& operator-=(const zgbmatrix&);
98  inline zgematrix& operator-=(const _zgbmatrix&);
99  inline zgematrix& operator-=(const zgsmatrix&);
100  inline zgematrix& operator-=(const _zgsmatrix&);
101  inline zgematrix& operator-=(const zhsmatrix&);
102  inline zgematrix& operator-=(const _zhsmatrix&);
103 
104  //////// *= ////////
105  inline zgematrix& operator*=(const zgematrix&);
106  inline zgematrix& operator*=(const _zgematrix&);
107  inline zgematrix& operator*=(const zhematrix&);
108  inline zgematrix& operator*=(const _zhematrix&);
109  inline zgematrix& operator*=(const zgbmatrix&);
110  inline zgematrix& operator*=(const _zgbmatrix&);
111  inline zgematrix& operator*=(const zgsmatrix&);
112  inline zgematrix& operator*=(const _zgsmatrix&);
113  inline zgematrix& operator*=(const zhsmatrix&);
114  inline zgematrix& operator*=(const _zhsmatrix&);
115  inline zgematrix& operator*=(const double&);
116  inline zgematrix& operator*=(const comple&);
117 
118  //////// /= ////////
119  inline zgematrix& operator/=(const double&);
120  inline zgematrix& operator/=(const comple&);
121 
122  //////// unary ////////
123  inline friend const zgematrix& operator+(const zgematrix&);
124  inline friend _zgematrix operator-(const zgematrix&);
125 
126  //////// + ////////
127  inline friend _zgematrix operator+(const zgematrix&, const zgematrix&);
128  inline friend _zgematrix operator+(const zgematrix&, const _zgematrix&);
129  inline friend _zgematrix operator+(const zgematrix&, const zhematrix&);
130  inline friend _zgematrix operator+(const zgematrix&, const _zhematrix&);
131  inline friend _zgematrix operator+(const zgematrix&, const zgbmatrix&);
132  inline friend _zgematrix operator+(const zgematrix&, const _zgbmatrix&);
133  inline friend _zgematrix operator+(const zgematrix&, const zgsmatrix&);
134  inline friend _zgematrix operator+(const zgematrix&, const _zgsmatrix&);
135  inline friend _zgematrix operator+(const zgematrix&, const zhsmatrix&);
136  inline friend _zgematrix operator+(const zgematrix&, const _zhsmatrix&);
137 
138  //////// - ////////
139  inline friend _zgematrix operator-(const zgematrix&, const zgematrix&);
140  inline friend _zgematrix operator-(const zgematrix&, const _zgematrix&);
141  inline friend _zgematrix operator-(const zgematrix&, const zhematrix&);
142  inline friend _zgematrix operator-(const zgematrix&, const _zhematrix&);
143  inline friend _zgematrix operator-(const zgematrix&, const zgbmatrix&);
144  inline friend _zgematrix operator-(const zgematrix&, const _zgbmatrix&);
145  inline friend _zgematrix operator-(const zgematrix&, const zgsmatrix&);
146  inline friend _zgematrix operator-(const zgematrix&, const _zgsmatrix&);
147  inline friend _zgematrix operator-(const zgematrix&, const zhsmatrix&);
148  inline friend _zgematrix operator-(const zgematrix&, const _zhsmatrix&);
149 
150  //////// * ////////
151  inline friend _zcovector operator*(const zgematrix&, const zcovector&);
152  inline friend _zcovector operator*(const zgematrix&, const _zcovector&);
153  inline friend _zgematrix operator*(const zgematrix&, const zgematrix&);
154  inline friend _zgematrix operator*(const zgematrix&, const _zgematrix&);
155  inline friend _zgematrix operator*(const zgematrix&, const zhematrix&);
156  inline friend _zgematrix operator*(const zgematrix&, const _zhematrix&);
157  inline friend _zgematrix operator*(const zgematrix&, const zgbmatrix&);
158  inline friend _zgematrix operator*(const zgematrix&, const _zgbmatrix&);
159  inline friend _zgematrix operator*(const zgematrix&, const zgsmatrix&);
160  inline friend _zgematrix operator*(const zgematrix&, const _zgsmatrix&);
161  inline friend _zgematrix operator*(const zgematrix&, const zhsmatrix&);
162  inline friend _zgematrix operator*(const zgematrix&, const _zhsmatrix&);
163  inline friend _zgematrix operator*(const zgematrix&, const double&);
164  inline friend _zgematrix operator*(const zgematrix&, const comple&);
165 
166  //////// / ////////
167  inline friend _zgematrix operator/(const zgematrix&, const double&);
168  inline friend _zgematrix operator/(const zgematrix&, const comple&);
169 
170  //////// double, comple ////////
171  inline friend _zgematrix operator*(const double&, const zgematrix&);
172  inline friend _zgematrix operator*(const comple&, const zgematrix&);
173 
174  //////// hadamard ////////
175  inline friend _zgematrix hadamard(const zgematrix&, const zgematrix&);
176 };
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
Definition: _zhematrix.hpp:3
Complex Double-precision General Sparse Matrix Class.
Definition: zgsmatrix.hpp:3
void resize(const CPPL_INT &, const CPPL_INT &)
friend std::ostream & operator<<(std::ostream &, const zgematrix &)
void shallow_copy(const _zgematrix &)
zgematrix & identity()
void copy(const zgematrix &)
zgematrix & operator/=(const double &)
comple ** darray
array of pointers of column head addresses
Definition: zgematrix.hpp:12
friend _zgematrix conj(const zgematrix &)
comple & operator()(const CPPL_INT &, const CPPL_INT &)
Definition: zgematrix-io.hpp:3
zgematrix & operator-=(const zgematrix &)
zgematrix & operator=(const zgematrix &)
friend _zcovector operator*(const zgematrix &, const zcovector &)
(DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
Definition: _zgsmatrix.hpp:3
friend _zgematrix i(const zgematrix &)
CPPL_INT zgels(zgematrix &)
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
Real Double-precision Row Vector Class.
Definition: drovector.hpp:3
zgematrix & zero()
friend _zgematrix _(zgematrix &)
comple * array
1D array to store matrix data
Definition: zgematrix.hpp:11
(DO NOT USE) Smart-temporary Complex Double-precision Row Vector Class
Definition: _zrovector.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
CPPL_INT zgeev(std::vector< comple > &)
zgematrix & set(const CPPL_INT &, const CPPL_INT &, const comple &)
void clear()
_zcovector col(const CPPL_INT &) const
Complex Double-precision Hermitian Sparse Matrix Class.
Definition: zhsmatrix.hpp:3
void read(const char *)
friend _zgematrix operator/(const zgematrix &, const double &)
Complex Double-precision General Band Matrix Class.
Definition: zgbmatrix.hpp:3
friend _zgematrix operator-(const zgematrix &)
CPPL_INT zgesvd(dcovector &, zgematrix &, zgematrix &)
CPPL_INT m
matrix row size
Definition: zgematrix.hpp:9
friend _zgematrix t(const zgematrix &)
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
Definition: _zgbmatrix.hpp:3
zgematrix & operator+=(const zgematrix &)
friend comple damax(const zgematrix &)
friend void swap(zgematrix &, zgematrix &)
Complex Double-precision Hermitian Matrix Class [l-type (UPLO=l) Strage].
Definition: zhematrix.hpp:4
Real Double-precision Column Vector Class.
Definition: dcovector.hpp:3
friend _zgematrix hadamard(const zgematrix &, const zgematrix &)
_zrovector row(const CPPL_INT &) const
friend void idamax(CPPL_INT &, CPPL_INT &, const zgematrix &)
Complex Double-precision Column Vector Class.
Definition: zcovector.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision Column Vector Class
Definition: _zcovector.hpp:3
friend _zgematrix conjt(const zgematrix &)
friend const zgematrix & operator+(const zgematrix &)
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Sparse Matrix Class ...
Definition: _zhsmatrix.hpp:3
CPPL_INT zgelss(zcovector &, dcovector &, CPPL_INT &, const double)
CPPL_INT zgesv(zgematrix &)
void write(const char *) const