GNU Octave
4.4.1
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) 2016-2018 John W. Eaton
4
Copyright (C) 2005-2018 David Bateman
5
Copyright (C) 1998-2005 Andy Adler
6
7
This file is part of Octave.
8
9
Octave is free software: you can redistribute it and/or modify it
10
under the terms of the GNU General Public License as published by
11
the Free Software Foundation, either version 3 of the License, or
12
(at your option) any later version.
13
14
Octave is distributed in the hope that it will be useful, but
15
WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with Octave; see the file COPYING. If not, see
21
<https://www.gnu.org/licenses/>.
22
23
*/
24
25
#if ! defined (octave_sparse_chol_h)
26
#define octave_sparse_chol_h 1
27
28
#include "octave-config.h"
29
30
class
RowVector
;
31
class
SparseMatrix
;
32
class
SparseComplexMatrix
;
33
34
namespace
octave
35
{
36
namespace
math
37
{
38
// If the sparse matrix classes become templated on the element type
39
// (i.e., sparse_matrix<double>), then it might be best to make the
40
// template parameter of this class also be the element type instead
41
// of the matrix type.
42
43
template
<
typename
chol_type>
44
class
45
sparse_chol
46
{
47
public
:
48
49
sparse_chol
(
void
);
50
51
sparse_chol
(
const
chol_type&
a
,
bool
natural,
bool
force);
52
53
sparse_chol
(
const
chol_type&
a
,
octave_idx_type
& info,
54
bool
natural,
bool
force);
55
56
sparse_chol
(
const
chol_type&
a
,
octave_idx_type
& info,
bool
natural);
57
58
sparse_chol
(
const
chol_type&
a
,
octave_idx_type
& info);
59
60
sparse_chol
(
const
sparse_chol<chol_type>
&
a
);
61
62
virtual
~
sparse_chol
(
void
);
63
64
sparse_chol
& operator = (
const
sparse_chol
&
a
);
65
66
chol_type L (
void
)
const
;
67
68
chol_type
R
(
void
)
const
{
return
L ().hermitian (); }
69
70
octave_idx_type
P (
void
)
const
;
71
72
RowVector
perm (
void
)
const
;
73
74
SparseMatrix
Q
(
void
)
const
;
75
76
bool
is_positive_definite (
void
)
const
;
77
78
double
rcond (
void
)
const
;
79
80
chol_type inverse (
void
)
const
;
81
82
protected
:
83
84
typedef
typename
chol_type::element_type
chol_elt
;
85
86
class
sparse_chol_rep
;
87
88
private
:
89
90
sparse_chol_rep
*
rep
;
91
};
92
93
template
<
typename
chol_type>
94
chol_type
95
chol2inv
(
const
chol_type& r);
96
97
// SparseComplexMatrix specialization.
98
99
template
<>
100
sparse_chol<SparseComplexMatrix>::sparse_chol
101
(
const
SparseComplexMatrix
&
a
,
octave_idx_type
& info);
102
}
103
}
104
105
#endif
octave
Definition:
aepbalance.cc:44
octave::math::sparse_chol::sparse_chol
sparse_chol(void)
Definition:
sparse-chol.cc:393
octave::math::sparse_chol::chol_elt
chol_type::element_type chol_elt
Definition:
sparse-chol.h:84
SparseComplexMatrix
Definition:
CSparse.h:47
octave::math::sparse_chol
Definition:
sparse-chol.h:44
a
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition:
cellfun.cc:400
octave::math::chol2inv
T chol2inv(const T &r)
Definition:
chol.cc:242
SparseMatrix
Definition:
dSparse.h:44
octave::math::sparse_chol::rep
sparse_chol_rep * rep
Definition:
sparse-chol.h:86
octave::math::sparse_chol::sparse_chol_rep
Definition:
sparse-chol.cc:49
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:785
octave_idx_type
RowVector
Definition:
dRowVector.h:31
octave::math::sparse_chol::R
chol_type R(void) const
Definition:
sparse-chol.h:68
liboctave
numeric
sparse-chol.h
Generated on Sat Sep 1 2018 14:01:46 for GNU Octave by
1.8.14