GNU Octave
6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
sparse-chol.h
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 1998-2021 The Octave Project Developers
4
//
5
// See the file COPYRIGHT.md in the top-level directory of this
6
// distribution or <https://octave.org/copyright/>.
7
//
8
// This file is part of Octave.
9
//
10
// Octave is free software: you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Octave is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU General Public License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with Octave; see the file COPYING. If not, see
22
// <https://www.gnu.org/licenses/>.
23
//
24
////////////////////////////////////////////////////////////////////////
25
26
#if ! defined (octave_sparse_chol_h)
27
#define octave_sparse_chol_h 1
28
29
#include "octave-config.h"
30
31
#include "
CSparse.h
"
32
33
class
RowVector
;
34
class
SparseMatrix
;
35
class
SparseComplexMatrix
;
36
37
namespace
octave
38
{
39
namespace
math
40
{
41
// If the sparse matrix classes become templated on the element type
42
// (i.e., sparse_matrix<double>), then it might be best to make the
43
// template parameter of this class also be the element type instead
44
// of the matrix type.
45
46
template
<
typename
chol_type>
47
class
48
sparse_chol
49
{
50
public
:
51
52
sparse_chol
(
void
);
53
54
sparse_chol
(
const
chol_type& a,
bool
natural,
bool
force);
55
56
sparse_chol
(
const
chol_type& a,
octave_idx_type
& info,
57
bool
natural,
bool
force);
58
59
sparse_chol
(
const
chol_type& a,
octave_idx_type
& info,
bool
natural);
60
61
sparse_chol
(
const
chol_type& a,
octave_idx_type
& info);
62
63
sparse_chol
(
const
sparse_chol<chol_type>
& a);
64
65
virtual
~
sparse_chol
(
void
);
66
67
sparse_chol
& operator = (
const
sparse_chol
& a);
68
69
chol_type L (
void
)
const
;
70
71
chol_type
R
(
void
)
const
{
return
L ().hermitian (); }
72
73
octave_idx_type
P (
void
)
const
;
74
75
RowVector
perm (
void
)
const
;
76
77
SparseMatrix
Q
(
void
)
const
;
78
79
bool
is_positive_definite (
void
)
const
;
80
81
double
rcond (
void
)
const
;
82
83
chol_type inverse (
void
)
const
;
84
85
protected
:
86
87
typedef
typename
chol_type::element_type
chol_elt
;
88
89
class
sparse_chol_rep
;
90
91
private
:
92
93
sparse_chol_rep
*
rep
;
94
};
95
96
template
<
typename
chol_type>
97
chol_type
98
chol2inv
(
const
chol_type&
r
);
99
100
// SparseComplexMatrix specialization.
101
102
template
<>
103
sparse_chol<SparseComplexMatrix>::sparse_chol
104
(
const
SparseComplexMatrix
& a,
octave_idx_type
& info);
105
}
106
}
107
108
#endif
CSparse.h
RowVector
Definition:
dRowVector.h:37
SparseComplexMatrix
Definition:
CSparse.h:52
SparseMatrix
Definition:
dSparse.h:49
octave::math::sparse_chol::sparse_chol_rep
Definition:
sparse-chol.cc:51
octave::math::sparse_chol
Definition:
sparse-chol.h:49
octave::math::sparse_chol::rep
sparse_chol_rep * rep
Definition:
sparse-chol.h:89
octave::math::sparse_chol::R
chol_type R(void) const
Definition:
sparse-chol.h:71
octave::math::sparse_chol::chol_elt
chol_type::element_type chol_elt
Definition:
sparse-chol.h:87
octave::math::sparse_chol::sparse_chol
sparse_chol(void)
Definition:
sparse-chol.cc:394
octave_idx_type
Q
F77_RET_T const F77_INT const F77_INT const F77_INT F77_DBLE const F77_INT F77_DBLE const F77_INT F77_DBLE * Q
Definition:
lo-lapack-proto.h:793
r
T * r
Definition:
mx-inlines.cc:773
octave::math::chol2inv
T chol2inv(const T &r)
Definition:
chol.cc:242
octave
Definition:
aepbalance.cc:41
liboctave
numeric
sparse-chol.h
Generated on Tue Apr 13 2021 15:27:51 for GNU Octave by
1.9.1