CPPLapack
 All Classes Files Functions Variables Friends Pages
_dgsmatrix.hpp
Go to the documentation of this file.
1 //=============================================================================
2 //! (DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
3 class _dgsmatrix
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<dcomponent> 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 _dgsmatrix();
19  inline _dgsmatrix(const _dgsmatrix&);
20  inline ~_dgsmatrix(); //destructor
21 
22  ///////////////////////////////////////////////
23  ////////////////// functions //////////////////
24  ///////////////////////////////////////////////
25  //////// cast ////////
26  inline _zgsmatrix to_zgsmatrix() const;
27  inline _dgematrix to_dgematrix() const;
28 
29  //////// io ////////
30  inline double operator()(const CPPL_INT&, const CPPL_INT&) const;//not return double&
31  inline friend std::ostream& operator<<(std::ostream&, const _dgsmatrix&);
32  inline void write(const char*) const;
33 
34  //////// misc ////////
35  inline void nullify() const;
36  inline void destroy() const;
37 
38  //////// calc ////////
39  inline friend _dgsmatrix t(const dgsmatrix&);
40  inline friend void idamax(CPPL_INT&, CPPL_INT&, const dgsmatrix&);
41  inline friend double damax(const dgsmatrix&);
42 
43  ///////////////////////////////////////////////
44  ///////////// numerical operators /////////////
45  ///////////////////////////////////////////////
46  //////// unary ////////
47  inline friend const _dgsmatrix& operator+(const _dgsmatrix&);
48  inline friend _dgsmatrix operator-(const _dgsmatrix&);
49 
50  //////// + ////////
51  inline friend _dgematrix operator+(const _dgsmatrix&, const dgematrix&);
52  inline friend _dgematrix operator+(const _dgsmatrix&, const _dgematrix&);
53  inline friend _dgematrix operator+(const _dgsmatrix&, const dsymatrix&);
54  inline friend _dgematrix operator+(const _dgsmatrix&, const _dsymatrix&);
55  inline friend _dgematrix operator+(const _dgsmatrix&, const dgbmatrix&);
56  inline friend _dgematrix operator+(const _dgsmatrix&, const _dgbmatrix&);
57  inline friend _dgsmatrix operator+(const _dgsmatrix&, const dgsmatrix&);
58  inline friend _dgsmatrix operator+(const _dgsmatrix&, const _dgsmatrix&);
59  inline friend _dgsmatrix operator+(const _dgsmatrix&, const dssmatrix&);
60  inline friend _dgsmatrix operator+(const _dgsmatrix&, const _dssmatrix&);
61 
62  //////// - ////////
63  inline friend _dgematrix operator-(const _dgsmatrix&, const dgematrix&);
64  inline friend _dgematrix operator-(const _dgsmatrix&, const _dgematrix&);
65  inline friend _dgematrix operator-(const _dgsmatrix&, const dsymatrix&);
66  inline friend _dgematrix operator-(const _dgsmatrix&, const _dsymatrix&);
67  inline friend _dgematrix operator-(const _dgsmatrix&, const dgbmatrix&);
68  inline friend _dgematrix operator-(const _dgsmatrix&, const _dgbmatrix&);
69  inline friend _dgsmatrix operator-(const _dgsmatrix&, const dgsmatrix&);
70  inline friend _dgsmatrix operator-(const _dgsmatrix&, const _dgsmatrix&);
71  inline friend _dgsmatrix operator-(const _dgsmatrix&, const dssmatrix&);
72  inline friend _dgsmatrix operator-(const _dgsmatrix&, const _dssmatrix&);
73 
74  //////// * ////////
75  inline friend _dcovector operator*(const _dgsmatrix&, const dcovector&);
76  inline friend _dcovector operator*(const _dgsmatrix&, const _dcovector&);
77  inline friend _dgematrix operator*(const _dgsmatrix&, const dgematrix&);
78  inline friend _dgematrix operator*(const _dgsmatrix&, const _dgematrix&);
79  inline friend _dgematrix operator*(const _dgsmatrix&, const dsymatrix&);
80  inline friend _dgematrix operator*(const _dgsmatrix&, const _dsymatrix&);
81  inline friend _dgematrix operator*(const _dgsmatrix&, const dgbmatrix&);
82  inline friend _dgematrix operator*(const _dgsmatrix&, const _dgbmatrix&);
83  inline friend _dgsmatrix operator*(const _dgsmatrix&, const dgsmatrix&);
84  inline friend _dgsmatrix operator*(const _dgsmatrix&, const _dgsmatrix&);
85  inline friend _dgsmatrix operator*(const _dgsmatrix&, const dssmatrix&);
86  inline friend _dgsmatrix operator*(const _dgsmatrix&, const _dssmatrix&);
87  inline friend _dgsmatrix operator*(const _dgsmatrix&, const double&);
88 
89  //////// / ////////
90  inline friend _dgsmatrix operator/(const _dgsmatrix&, const double&);
91 
92  //////// double ////////
93  inline friend _dgsmatrix operator*(const double&, const _dgsmatrix&);
94 };
Real Double-precision General Sparse Matrix Class.
Definition: dgsmatrix.hpp:3
std::vector< std::vector< CPPL_INT > > cols
array of vector to store the entry information of component for each column
Definition: _dgsmatrix.hpp:13
void write(const char *) const
_zgsmatrix to_zgsmatrix() const
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
Definition: _dgsmatrix.hpp:12
CPPL_INT n
matrix column size
Definition: _dgsmatrix.hpp:10
_dgematrix to_dgematrix() const
friend double damax(const dgsmatrix &)
(DO NOT USE) Smart-temporary Real Double-precision Symmetric Sparse Matrix Class
Definition: _dssmatrix.hpp:3
friend void idamax(CPPL_INT &, CPPL_INT &, const dgsmatrix &)
(DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
Definition: _zgsmatrix.hpp:3
Real Double-precision General Dence Matrix Class.
Definition: dgematrix.hpp:3
double operator()(const CPPL_INT &, const CPPL_INT &) const
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
Definition: dsymatrix.hpp:3
(DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
Definition: _dgsmatrix.hpp:3
CPPL_INT m
matrix row size
Definition: _dgsmatrix.hpp:9
void destroy() const
friend const _dgsmatrix & operator+(const _dgsmatrix &)
friend _dgsmatrix operator/(const _dgsmatrix &, const double &)
(DO NOT USE) Smart-temporary Real Double-precision General Dence Matrix Class
Definition: _dgematrix.hpp:3
Real Double-precision General Band Matrix Class.
Definition: dgbmatrix.hpp:3
void nullify() const
std::vector< dcomponent > data
matrix data
Definition: _dgsmatrix.hpp:11
friend _dcovector operator*(const _dgsmatrix &, const dcovector &)
(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class
Definition: _dgbmatrix.hpp:3
(DO NOT USE) Smart-temporary Real Double-precision Symmetric Matrix Class
Definition: _dsymatrix.hpp:3
friend _dgsmatrix t(const dgsmatrix &)
Real Double-precision Column Vector Class.
Definition: dcovector.hpp:3
friend _dgsmatrix operator-(const _dgsmatrix &)
Real Double-precision Symmetric Sparse Matrix Class.
Definition: dssmatrix.hpp:3
(DO NOT USE) Smart-temporary Real Double-precision Column Vector Class
Definition: _dcovector.hpp:3
friend std::ostream & operator<<(std::ostream &, const _dgsmatrix &)