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