CPPLapack
 All Classes Files Functions Variables Friends Pages
_zgsmatrix.hpp
Go to the documentation of this file.
1 //=============================================================================
2 //! (DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
3 class _zgsmatrix
4 {
5 public:
6  ///////////////////////////////////////////////
7  /////////////////// objects ///////////////////
8  ///////////////////////////////////////////////
9  mutable CPPL_INT m; //!< matrix row size
10  mutable CPPL_INT n; //!< matrix column size
11  mutable std::vector<zcomponent> data; //!< matrix data
12  mutable std::vector< std::vector<CPPL_INT> > rows; //!< array of vector to store the entry information of component for each row
13  mutable std::vector< std::vector<CPPL_INT> > cols; //!< array of vector to store the entry information of component for each column
14 
15  ///////////////////////////////////////////////
16  ///////////////// constructors ////////////////
17  ///////////////////////////////////////////////
18  inline _zgsmatrix();
19  inline _zgsmatrix(const _zgsmatrix&);
20  inline ~_zgsmatrix(); //destructor
21 
22  ///////////////////////////////////////////////
23  ////////////////// functions //////////////////
24  ///////////////////////////////////////////////
25  //////// cast ////////
26  inline _zgematrix to_zgematrix() const;
27 
28  //////// io ////////
29  inline comple operator()(const CPPL_INT&, const CPPL_INT&) const;//not return comple&
30  inline friend std::ostream& operator<<(std::ostream&, const _zgsmatrix&);
31  inline void write(const char*) const;
32 
33  //////// misc ////////
34  inline void nullify() const;
35  inline void destroy() const;
36 
37  //////// calc ////////
38  inline friend _zgsmatrix t(const zgsmatrix&);
39  inline friend void idamax(CPPL_INT&, CPPL_INT&, const zgsmatrix&);
40  inline friend comple damax(const zgsmatrix&);
41 
42  ///////////////////////////////////////////////
43  ///////////// numerical operators /////////////
44  ///////////////////////////////////////////////
45  //////// unary ////////
46  inline friend const _zgsmatrix& operator+(const _zgsmatrix&);
47  inline friend _zgsmatrix operator-(const _zgsmatrix&);
48 
49  //////// + ////////
50  inline friend _zgematrix operator+(const _zgsmatrix&, const zgematrix&);
51  inline friend _zgematrix operator+(const _zgsmatrix&, const _zgematrix&);
52  inline friend _zgematrix operator+(const _zgsmatrix&, const zhematrix&);
53  inline friend _zgematrix operator+(const _zgsmatrix&, const _zhematrix&);
54  inline friend _zgematrix operator+(const _zgsmatrix&, const zgbmatrix&);
55  inline friend _zgematrix operator+(const _zgsmatrix&, const _zgbmatrix&);
56  inline friend _zgsmatrix operator+(const _zgsmatrix&, const zgsmatrix&);
57  inline friend _zgsmatrix operator+(const _zgsmatrix&, const _zgsmatrix&);
58  inline friend _zgsmatrix operator+(const _zgsmatrix&, const zhsmatrix&);
59  inline friend _zgsmatrix operator+(const _zgsmatrix&, const _zhsmatrix&);
60 
61  //////// - ////////
62  inline friend _zgematrix operator-(const _zgsmatrix&, const zgematrix&);
63  inline friend _zgematrix operator-(const _zgsmatrix&, const _zgematrix&);
64  inline friend _zgematrix operator-(const _zgsmatrix&, const zhematrix&);
65  inline friend _zgematrix operator-(const _zgsmatrix&, const _zhematrix&);
66  inline friend _zgematrix operator-(const _zgsmatrix&, const zgbmatrix&);
67  inline friend _zgematrix operator-(const _zgsmatrix&, const _zgbmatrix&);
68  inline friend _zgsmatrix operator-(const _zgsmatrix&, const zgsmatrix&);
69  inline friend _zgsmatrix operator-(const _zgsmatrix&, const _zgsmatrix&);
70  inline friend _zgsmatrix operator-(const _zgsmatrix&, const zhsmatrix&);
71  inline friend _zgsmatrix operator-(const _zgsmatrix&, const _zhsmatrix&);
72 
73  //////// * ////////
74  inline friend _zcovector operator*(const _zgsmatrix&, const zcovector&);
75  inline friend _zcovector operator*(const _zgsmatrix&, const _zcovector&);
76  inline friend _zgematrix operator*(const _zgsmatrix&, const zgematrix&);
77  inline friend _zgematrix operator*(const _zgsmatrix&, const _zgematrix&);
78  inline friend _zgematrix operator*(const _zgsmatrix&, const zhematrix&);
79  inline friend _zgematrix operator*(const _zgsmatrix&, const _zhematrix&);
80  inline friend _zgematrix operator*(const _zgsmatrix&, const zgbmatrix&);
81  inline friend _zgematrix operator*(const _zgsmatrix&, const _zgbmatrix&);
82  inline friend _zgsmatrix operator*(const _zgsmatrix&, const zgsmatrix&);
83  inline friend _zgsmatrix operator*(const _zgsmatrix&, const _zgsmatrix&);
84  inline friend _zgsmatrix operator*(const _zgsmatrix&, const zhsmatrix&);
85  inline friend _zgsmatrix operator*(const _zgsmatrix&, const _zhsmatrix&);
86  inline friend _zgsmatrix operator*(const _zgsmatrix&, const double&);
87  inline friend _zgsmatrix operator*(const _zgsmatrix&, const comple&);
88 
89  //////// / ////////
90  inline friend _zgsmatrix operator/(const _zgsmatrix&, const double&);
91  inline friend _zgsmatrix operator/(const _zgsmatrix&, const comple&);
92 
93  //////// double, complex ////////
94  inline friend _zgsmatrix operator*(const double&, const _zgsmatrix&);
95  inline friend _zgsmatrix operator*(const comple&, const _zgsmatrix&);
96 };
friend _zcovector operator*(const _zgsmatrix &, const zcovector &)
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
Definition: _zgsmatrix.hpp:12
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Matrix Class
Definition: _zhematrix.hpp:3
std::vector< std::vector< CPPL_INT > > cols
array of vector to store the entry information of component for each column
Definition: _zgsmatrix.hpp:13
Complex Double-precision General Sparse Matrix Class.
Definition: zgsmatrix.hpp:3
friend comple damax(const zgsmatrix &)
friend void idamax(CPPL_INT &, CPPL_INT &, const zgsmatrix &)
friend _zgsmatrix operator/(const _zgsmatrix &, const double &)
friend std::ostream & operator<<(std::ostream &, const _zgsmatrix &)
friend const _zgsmatrix & operator+(const _zgsmatrix &)
CPPL_INT n
matrix column size
Definition: _zgsmatrix.hpp:10
(DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
Definition: _zgsmatrix.hpp:3
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
comple operator()(const CPPL_INT &, const CPPL_INT &) const
friend _zgsmatrix operator-(const _zgsmatrix &)
Complex Double-precision Hermitian Sparse Matrix Class.
Definition: zhsmatrix.hpp:3
CPPL_INT m
matrix row size
Definition: _zgsmatrix.hpp:9
Complex Double-precision General Band Matrix Class.
Definition: zgbmatrix.hpp:3
void destroy() const
void write(const char *) const
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
Definition: _zgbmatrix.hpp:3
friend _zgsmatrix t(const zgsmatrix &)
Complex Double-precision Hermitian Matrix Class [l-type (UPLO=l) Strage].
Definition: zhematrix.hpp:4
_zgematrix to_zgematrix() const
void nullify() const
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
(DO NOT USE) Smart-temporary Complex Double-precision Hermitian Sparse Matrix Class ...
Definition: _zhsmatrix.hpp:3
std::vector< zcomponent > data
matrix data
Definition: _zgsmatrix.hpp:11