MyraMath
RCholeskySolver.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_RCHOLESKYSOLVER_H
7 #define MYRAMATH_DENSE_RCHOLESKYSOLVER_H
8 
16 
17 #include <utility>
18 #include <stdint.h> // for uint64_t
19 
20 namespace myra {
21 
22 // Forward declarations.
23 class InputStream;
24 class OutputStream;
25 template<class Number> class MatrixRange;
26 template<class Number> class LowerMatrix;
27 
29 template<class Precision> class MYRAMATH_EXPORT RCholeskySolver
30  {
31  public:
32 
33  // Useful typedefs.
35 
37  explicit RCholeskySolver(const LowerMatrix<Precision>& A);
38 
39 #ifdef MYRAMATH_ENABLE_CPP11
42 #endif
43 
46 
48  explicit RCholeskySolver(InputStream& in);
49 
51  void write(OutputStream& out) const;
52 
54  // side = Solve by A from the 'L'eft or from the 'R'ight?
55  // op = Apply an operation to A? ('T'ranspose, 'H'ermitian, 'C'onjugate or 'N'othing)
56  void solve(const Range& B, char side = 'L', char op = 'N') const;
57 
59  // side = Solve by L from the 'L'eft or from the 'R'ight?
60  // op = Apply an operation to L? ('T'ranspose, 'H'ermitian, 'C'onjugate or 'N'othing)
61  uint64_t solveL(const Range& B, char side, char op) const;
62 
64  std::pair<int,int> inertia() const;
65 
67  int size() const;
68 
69  private:
70 
71  // Internal contents.
73  };
74 
76 template<class Precision> class ReflectNumber< RCholeskySolver<Precision> >
77  { public: typedef Precision 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 A into L*L&#39;, presents solve methods.
Definition: RCholeskySolver.h:29