MyraMath
ZCholeskySolver.h
Go to the documentation of this file.
1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
6 #ifndef MYRAMATH_DENSE_ZCHOLESKYSOLVER_H
7 #define MYRAMATH_DENSE_ZCHOLESKYSOLVER_H
8 
16 
17 #include <stdint.h> // for uint64_t
18 
19 namespace myra {
20 
21 // Forward declarations.
22 class InputStream;
23 class OutputStream;
24 template<class Number> class MatrixRange;
25 
27 template<class Precision> class MYRAMATH_EXPORT ZCholeskySolver
28  {
29  public:
30 
31  // Useful typedefs.
32  typedef std::complex<Precision> Number;
33  typedef MatrixRange<Number> Range;
34 
36  explicit ZCholeskySolver(const LowerMatrix<Number>& A);
37 
38 #ifdef MYRAMATH_ENABLE_CPP11
41 #endif
42 
45 
47  explicit ZCholeskySolver(InputStream& in);
48 
50  void write(OutputStream& out) const;
51 
53  // side = Solve by A from the 'L'eft or from the 'R'ight?
54  // op = Apply an operation to A? ('T'ranspose, 'H'ermitian, 'C'onjugate or 'N'othing)
55  void solve(const Range& B, char side = 'L', char op = 'N') const;
56 
58  // side = Solve by L from the 'L'eft or from the 'R'ight?
59  // op = Apply an operation to L? ('T'ranspose, 'H'ermitian, 'C'onjugate or 'N'othing)
60  uint64_t solveL (const Range& B, char side, char op) const;
61 
63  std::pair<int,int> inertia() const;
64 
66  int size() const;
67 
68  private:
69 
70  // Internal contents.
72 
73  };
74 
76 template<class Precision> class ReflectNumber< ZCholeskySolver<Precision> >
77  { public: typedef typename ZCholeskySolver<Precision>::Number type; };
78 
79 } // namespace
80 
81 #endif
Reflects Number trait for a Container, containers of Numbers (Matrix&#39;s, Vector&#39;s, etc) should special...
Definition: Number.h:55
Definition: syntax.dox:1
Abstraction layer, serializable objects write themselves to these.
Definition: Streams.h:39
Specialized container for a lower triangular matrix, O(N^2/2) storage. Used by symmetry exploiting ma...
Various utility functions/classes related to scalar Number types.
Represents a mutable MatrixRange.
Definition: conjugate.h:26
Abstraction layer, deserializable objects read themselves from these.
Definition: Streams.h:47
Factors complex hermitian A into L*L&#39;, presents solve methods.
Definition: ZCholeskySolver.h:27
Stores a lower triangular matrix in rectangular packed format.
Definition: conjugate.h:22