CPPLapack
 All Classes Files Functions Variables Friends Pages
zgematrix_small.hpp
Go to the documentation of this file.
1 //=============================================================================
2 //! Samll Complex Double-precision General Dence Matrix Class
3 template<CPPL_INT m, CPPL_INT n> class zgematrix_small
4 {
5 public:
6  ///////////////////////////////////////////////
7  /////////////////// objects ///////////////////
8  ///////////////////////////////////////////////
9  comple array[m*n];
10 
11  ///////////////////////////////////////////////
12  ///////////////// constructors ////////////////
13  ///////////////////////////////////////////////
14  inline zgematrix_small();
15  inline explicit zgematrix_small(const zgematrix&);
16  inline ~zgematrix_small();
17 
18  ///////////////////////////////////////////////
19  ////////////////// functions //////////////////
20  ///////////////////////////////////////////////
21  //////// cast ////////
22  inline _zgematrix to_zgematrix() const;
23 
24  //////// io ////////
25  inline comple& operator()(const CPPL_INT& i, const CPPL_INT& j);
26  inline comple operator()(const CPPL_INT& i, const CPPL_INT& j) const;
27  inline zgematrix_small<m,n>& set(const CPPL_INT& i, const CPPL_INT& j, const comple& v);
28  template<CPPL_INT _m, CPPL_INT _n> inline friend std::ostream& operator<<(std::ostream&, const zgematrix_small<_m,_n>&);
29  inline void read(const char* filename);
30  inline void write(const char* filename) const;
31 
32  //////// calc ////////
33 #ifndef _MSC_VER
34  template<CPPL_INT _m, CPPL_INT _n> inline friend zgematrix_small<n,m> t(const zgematrix_small<m,n>&);
35 #endif//_MSC_VER
36 
37  //////// misc ////////
38  inline zgematrix_small<m,n>& zero();
40  inline zcovector_small<m> col(const CPPL_INT& j) const;
41  inline zrovector_small<n> row(const CPPL_INT& i) const;
42 
43  ///////////////////////////////////////////////
44  ///////////// numerical operators /////////////
45  ///////////////////////////////////////////////
46 #ifndef _MSC_VER
47  //////// = ////////
48  template<CPPL_INT M, CPPL_INT N> inline zgematrix_small<M,N>& operator= (const zgematrix_small<M,N>&);
49  //////// += ////////
50  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N>& operator+=(zgematrix_small<M,N>&, const zgematrix_small<M,N>&);
51  //////// -= ////////
52  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N>& operator-=(zgematrix_small<M,N>&, const zgematrix_small<M,N>&);
53  //////// *= ////////
54  template<CPPL_INT M, CPPL_INT L, CPPL_INT N> inline friend zgematrix_small<M,N>& operator*=(zgematrix_small<M,L>&, const zgematrix_small<L,N>&);
55  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N>& operator*=(zgematrix_small<M,N>&, const double&);
56  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N>& operator*=(zgematrix_small<M,N>&, const comple&);
57  //////// /= ////////
58  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N>& operator/=(zgematrix_small<M,N>&, const double&);
59  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N>& operator/=(zgematrix_small<M,N>&, const comple&);
60  //////// unary ////////
61  template<CPPL_INT M, CPPL_INT N> inline friend const zgematrix_small<M,N>& operator+(const zgematrix_small<M,N>&);
62  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator-(const zgematrix_small<M,N>&);
63  //////// + ////////
64  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator+(const zgematrix_small<M,N>&, const zgematrix_small<M,N>&);
65  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator+(const zgematrix_small<M,N>&, const zhematrix_small< N >&);
66  //////// - ////////
67  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator-(const zgematrix_small<M,N>&, const zgematrix_small<M,N>&);
68  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator-(const zgematrix_small<M,N>&, const zhematrix_small< N >&);
69  //////// * ////////
70  template<CPPL_INT M, CPPL_INT N> inline friend zcovector_small< M > operator*(const zgematrix_small<M,N>&, const zcovector_small< N >&);
71  template<CPPL_INT M, CPPL_INT L, CPPL_INT N> inline friend zgematrix_small<M,N> operator*(const zgematrix_small<M,L>&, const zgematrix_small<L,N>&);
72  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator*(const zgematrix_small<M,N>&, const zhematrix_small< N >&);
73  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator*(const zgematrix_small<M,N>&, const double&);
74  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator*(const zgematrix_small<M,N>&, const comple&);
75  //////// / ////////
76  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator/(const zgematrix_small<M,N>&, const double&);
77  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator/(const zgematrix_small<M,N>&, const comple&);
78  //////// comple ////////
79  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator*(const double&, const zgematrix_small<M,N>&);
80  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> operator*(const comple&, const zgematrix_small<M,N>&);
81  //////// hadamerd ////////
82  template<CPPL_INT M, CPPL_INT N> inline friend zgematrix_small<M,N> hadamerd(const zgematrix_small<M,N>&, const zgematrix_small<M,N>&);
83  template<CPPL_INT N> inline friend zgematrix_small<N,N> hadamerd(const zgematrix_small<N,N>&, const zhematrix_small< N >&);
84 #endif//_MSC_VER
85 };
86 
87 ///////////////////////////////////////////////////////////////////////////////
88 ///////////////////////////////////////////////////////////////////////////////
89 ///////////////////////////////////////////////////////////////////////////////
90 
91 inline comple det(const zgemat2&);
92 inline zgemat2 inv(const zgemat2&);
93 inline comple det(const zgemat3&);
94 inline zgemat3 inv(const zgemat3&);
friend zgematrix_small< M, N > & operator*=(zgematrix_small< M, L > &, const zgematrix_small< L, N > &)
friend zcovector_small< M > operator*(const zgematrix_small< M, N > &, const zcovector_small< N > &)
void write(const char *filename) const
friend zgematrix_small< n, m > t(const zgematrix_small< m, n > &)
friend zgematrix_small< M, N > hadamerd(const zgematrix_small< M, N > &, const zgematrix_small< M, N > &)
comple array[m *n]
_dgematrix i(const _dgbmatrix &mat)
Samll Complex Double-precision Column Vector Class.
friend const zgematrix_small< M, N > & operator+(const zgematrix_small< M, N > &)
Samll Complex Double-precision Row Vector Class.
_zgematrix to_zgematrix() const
Complex Double-precision General Dence Matrix Class.
Definition: zgematrix.hpp:3
friend zgematrix_small< M, N > & operator+=(zgematrix_small< M, N > &, const zgematrix_small< M, N > &)
friend zgematrix_small< M, N > & operator/=(zgematrix_small< M, N > &, const double &)
comple det(const zgemat2 &)
friend zgematrix_small< M, N > operator-(const zgematrix_small< M, N > &)
friend zgematrix_small< M, N > operator/(const zgematrix_small< M, N > &, const double &)
(DO NOT USE) Smart-temporary Complex Double-precision General Dence Matrix Class
Definition: _zgematrix.hpp:3
zgemat2 inv(const zgemat2 &)
zgematrix_small< m, n > & zero()
zgematrix_small< m, n > & identity()
zgematrix_small< M, N > & operator=(const zgematrix_small< M, N > &)
friend zgematrix_small< M, N > & operator-=(zgematrix_small< M, N > &, const zgematrix_small< M, N > &)
zrovector_small< n > row(const CPPL_INT &i) const
zcovector_small< m > col(const CPPL_INT &j) const
void read(const char *filename)
zgematrix_small< m, n > & set(const CPPL_INT &i, const CPPL_INT &j, const comple &v)
comple & operator()(const CPPL_INT &i, const CPPL_INT &j)
Samll Complex Double-precision General Dence Matrix Class.
Samll Complex Double-precision Symmetric Matrix Class.