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