1 ///////////////////////////////////////////////////////////////////////////////
2 //                                                                           //
3 // The Template Matrix/Vector Library for C++ was created by Mike Jarvis     //
4 // Copyright (C) 1998 - 2016                                                 //
5 // All rights reserved                                                       //
6 //                                                                           //
7 // The project is hosted at https://code.google.com/p/tmv-cpp/               //
8 // where you can find the current version and current documention.           //
9 //                                                                           //
10 // For concerns or problems with the software, Mike may be contacted at      //
11 // mike_jarvis17 [at] gmail.                                                 //
12 //                                                                           //
13 // This software is licensed under a FreeBSD license.  The file              //
14 // TMV_LICENSE should have bee included with this distribution.              //
15 // It not, you can get a copy from https://code.google.com/p/tmv-cpp/.       //
16 //                                                                           //
17 // Essentially, you can use this software however you want provided that     //
18 // you include the TMV_LICENSE file in any distribution that uses it.        //
19 //                                                                           //
20 ///////////////////////////////////////////////////////////////////////////////
21 
22 
23 #ifndef TMV_BaseSymMatrix_H
24 #define TMV_BaseSymMatrix_H
25 
26 #include "tmv/TMV_BaseMatrix.h"
27 
28 namespace tmv {
29 
30     template <typename T>
31     class GenSymMatrix;
32 
33     template <typename T, int A=0>
34     class ConstSymMatrixView;
35 
36     template <typename T, int A=0>
37     class SymMatrixView;
38 
39     template <typename T, int A=0>
40     class SymMatrix;
41 
42     template <typename T, int A=0>
43     class HermMatrix;
44 
45     template <typename T>
46     class SymDivider;
47 
48     template <typename T>
49     class SymLDLDiv;
50 
51     template <typename T>
52     class HermCHDiv;
53 
54     template <typename T>
55     class HermSVDiv;
56 
57     template <typename T>
58     class SymSVDiv;
59 
60     template <typename T, typename Tm>
61     class QuotXS;
62 
63     template <typename T>
64     struct AssignableToSymMatrix :
65         virtual public AssignableToMatrix<T>
66     {
67         typedef TMV_RealType(T) RT;
68         typedef TMV_ComplexType(T) CT;
69         virtual ptrdiff_t size() const = 0;
70         virtual SymType sym() const = 0;
issymAssignableToSymMatrix71         inline bool issym() const { return isReal(T()) || (sym() == Sym); }
ishermAssignableToSymMatrix72         inline bool isherm() const
73         { return isReal(T()) || (sym() == Herm); }
74         virtual void assignToS(SymMatrixView<RT> m) const = 0;
75         virtual void assignToS(SymMatrixView<CT> m) const = 0;
~AssignableToSymMatrixAssignableToSymMatrix76         virtual inline ~AssignableToSymMatrix() {}
77     };
78 
79     template <typename T, int A>
TMV_Text(const SymMatrix<T,A> &)80     inline std::string TMV_Text(const SymMatrix<T,A>& )
81     {
82         return std::string("SymMatrix<") +
83             TMV_Text(T()) + "," + Attrib<A>::text() + ">";
84     }
85 
86     template <typename T, int A>
TMV_Text(const HermMatrix<T,A> &)87     inline std::string TMV_Text(const HermMatrix<T,A>& )
88     {
89         return std::string("HermMatrix<") +
90             TMV_Text(T()) + "," + Attrib<A>::text() + ">";
91     }
92 
93     template <typename T>
TMV_Text(const GenSymMatrix<T> &)94     inline std::string TMV_Text(const GenSymMatrix<T>& )
95     {
96         return std::string("GenSymMatrix<") + TMV_Text(T()) + ">";
97     }
98 
99     template <typename T, int A>
TMV_Text(const ConstSymMatrixView<T,A> &)100     inline std::string TMV_Text(const ConstSymMatrixView<T,A>& )
101     {
102         return std::string("ConstSymMatrixView<") +
103             TMV_Text(T()) + "," + Attrib<A>::text() + ">";
104     }
105 
106     template <typename T, int A>
TMV_Text(const SymMatrixView<T,A> &)107     inline std::string TMV_Text(const SymMatrixView<T,A>& )
108     {
109         return std::string("SymMatrixView<") +
110             TMV_Text(T()) + "," + Attrib<A>::text() + ">";
111     }
112 
113 }
114 
115 #endif
116