GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
liboctave
numeric
sparse-chol.h
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 2016-2017 John W. Eaton
4
Copyright (C) 2005-2016 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 the
11
Free Software Foundation; either version 3 of the License, or (at your
12
option) any later version.
13
14
Octave is distributed in the hope that it will be useful, but WITHOUT
15
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17
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
<http://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
#include "
CSparse.h
"
31
#include "
dRowVector.h
"
32
#include "
dSparse.h
"
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
Octave interface to the compression and uncompression libraries.
Definition:
aepbalance.cc:47
octave::math::sparse_chol::R
chol_type R(void) const
Definition:
sparse-chol.h:68
dSparse.h
octave::math::sparse_chol::sparse_chol
sparse_chol(void)
Definition:
sparse-chol.cc:381
P
ar P
Definition:
__luinc__.cc:49
octave::math::sparse_chol::chol_elt
chol_type::element_type chol_elt
Definition:
sparse-chol.h:84
SparseComplexMatrix
Definition:
CSparse.h:50
octave::math::sparse_chol
Definition:
sparse-chol.h:44
dRowVector.h
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:398
octave::math::chol2inv
T chol2inv(const T &r)
Definition:
chol.cc:247
SparseMatrix
Definition:
dSparse.h:47
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:42
CSparse.h
octave_idx_type
RowVector
Definition:
dRowVector.h:32
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:786
Generated on Wed May 10 2017 15:42:59 for GNU Octave by
1.8.8