1 | /*! |
---|
2 | * \file |
---|
3 | * \brief Definitions of Cholesky factorisation functions |
---|
4 | * \author Tony Ottosson |
---|
5 | * |
---|
6 | * ------------------------------------------------------------------------- |
---|
7 | * |
---|
8 | * IT++ - C++ library of mathematical, signal processing, speech processing, |
---|
9 | * and communications classes and functions |
---|
10 | * |
---|
11 | * Copyright (C) 1995-2007 (see AUTHORS file for a list of contributors) |
---|
12 | * |
---|
13 | * This program is free software; you can redistribute it and/or modify |
---|
14 | * it under the terms of the GNU General Public License as published by |
---|
15 | * the Free Software Foundation; either version 2 of the License, or |
---|
16 | * (at your option) any later version. |
---|
17 | * |
---|
18 | * This program is distributed in the hope that it will be useful, |
---|
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
21 | * GNU General Public License for more details. |
---|
22 | * |
---|
23 | * You should have received a copy of the GNU General Public License |
---|
24 | * along with this program; if not, write to the Free Software |
---|
25 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
26 | * |
---|
27 | * ------------------------------------------------------------------------- |
---|
28 | */ |
---|
29 | |
---|
30 | #ifndef CHOLESKY_H |
---|
31 | #define CHOLESKY_H |
---|
32 | |
---|
33 | #include <itpp/base/mat.h> |
---|
34 | |
---|
35 | |
---|
36 | namespace itpp { |
---|
37 | |
---|
38 | /*! \addtogroup matrixdecomp |
---|
39 | */ |
---|
40 | //!@{ |
---|
41 | |
---|
42 | /*! |
---|
43 | \brief Cholesky factorisation of real symmetric and positive definite matrix |
---|
44 | |
---|
45 | The Cholesky factorisation of a real symmetric positive-definite matrix \f$\mathbf{X}\f$ |
---|
46 | of size \f$n \times n\f$ is given by |
---|
47 | \f[ |
---|
48 | \mathbf{X} = \mathbf{F}^T \mathbf{F} |
---|
49 | \f] |
---|
50 | where \f$\mathbf{F}\f$ is an upper trangular \f$n \times n\f$ matrix. |
---|
51 | |
---|
52 | Returns true if calcuation succeeded. False otherwise. |
---|
53 | */ |
---|
54 | bool chol(const mat &X, mat &F); |
---|
55 | |
---|
56 | /*! |
---|
57 | \brief Cholesky factorisation of real symmetric and positive definite matrix |
---|
58 | |
---|
59 | The Cholesky factorisation of a real symmetric positive-definite matrix \f$\mathbf{X}\f$ |
---|
60 | of size \f$n \times n\f$ is given by |
---|
61 | \f[ |
---|
62 | \mathbf{X} = \mathbf{F}^T \mathbf{F} |
---|
63 | \f] |
---|
64 | where \f$\mathbf{F}\f$ is an upper trangular \f$n \times n\f$ matrix. |
---|
65 | */ |
---|
66 | mat chol(const mat &X); |
---|
67 | |
---|
68 | |
---|
69 | /*! |
---|
70 | \brief Cholesky factorisation of complex hermitian and positive-definite matrix |
---|
71 | |
---|
72 | The Cholesky factorisation of a hermitian positive-definite matrix \f$\mathbf{X}\f$ |
---|
73 | of size \f$n \times n\f$ is given by |
---|
74 | \f[ |
---|
75 | \mathbf{X} = \mathbf{F}^H \mathbf{F} |
---|
76 | \f] |
---|
77 | where \f$\mathbf{F}\f$ is an upper trangular \f$n \times n\f$ matrix. |
---|
78 | |
---|
79 | Returns true if calcuation succeeded. False otherwise. |
---|
80 | |
---|
81 | If \c X is positive definite, true is returned and \c F=chol(X) |
---|
82 | produces an upper triangular \c F. If also \c X is symmetric then \c F'*F = X. |
---|
83 | If \c X is not positive definite, false is returned. |
---|
84 | */ |
---|
85 | bool chol(const cmat &X, cmat &F); |
---|
86 | |
---|
87 | /*! |
---|
88 | \brief Cholesky factorisation of complex hermitian and positive-definite matrix |
---|
89 | |
---|
90 | The Cholesky factorisation of a hermitian positive-definite matrix \f$\mathbf{X}\f$ |
---|
91 | of size \f$n \times n\f$ is given by |
---|
92 | \f[ |
---|
93 | \mathbf{X} = \mathbf{F}^H \mathbf{F} |
---|
94 | \f] |
---|
95 | where \f$\mathbf{F}\f$ is an upper trangular \f$n \times n\f$ matrix. |
---|
96 | */ |
---|
97 | cmat chol(const cmat &X); |
---|
98 | |
---|
99 | //!@} |
---|
100 | |
---|
101 | } // namespace itpp |
---|
102 | |
---|
103 | #endif // #ifndef CHOLESKY_H |
---|