24 #if !defined (octave_sparse_base_chol_h)
25 #define octave_sparse_base_chol_h 1
30 template <
class chol_type,
class chol_elt,
class p_type>
40 : count (1), Lsparse (0), Common (), is_pd (false), minor_p (0),
45 : count (1), Lsparse (0), Common (), is_pd (false), minor_p (0),
48 init (a, natural, force);
52 bool natural,
bool force)
53 : count (1), Lsparse (0), Common (), is_pd (false), minor_p (0),
56 info = init (a, natural, force);
62 CHOLMOD_NAME (free_sparse) (&Lsparse, &Common);
65 cholmod_sparse *
L (
void)
const {
return Lsparse; }
69 return (minor_p == static_cast<octave_idx_type>(Lsparse->ncol) ?
75 p_type
Q (
void)
const;
79 double rcond (
void)
const {
return cond; }
98 void drop_zeros (
const cholmod_sparse* S);
111 : count (1), is_pd (false), minor_p (0), perms (), cond (0) { }
113 sparse_base_chol_rep (
const chol_type& a,
bool natural,
bool force)
114 : count (1), is_pd (false), minor_p (0), perms (), cond (0)
116 init (a, natural, force);
120 bool natural,
bool force)
121 : count (1), is_pd (false), minor_p (0), perms (), cond (0)
123 info = init (a, natural, force);
126 ~sparse_base_chol_rep (
void) { }
132 p_type
Q (
void)
const;
134 bool is_positive_definite (
void)
const {
return is_pd; }
136 double rcond (
void)
const {
return cond; }
153 sparse_base_chol_rep (
const sparse_base_chol_rep&);
155 sparse_base_chol_rep& operator = (
const sparse_base_chol_rep&);
160 sparse_base_chol_rep *
rep;
167 ::sparse_base_chol_rep ())
173 ::sparse_base_chol_rep (a, natural, force))
177 bool natural,
bool force)
180 ::sparse_base_chol_rep (a, info, natural, force))
189 if (--rep->count == 0)
197 if (--rep->count == 0)
207 chol_type L (
void)
const;
215 p_type
Q (
void)
const {
return rep->Q (); }
218 {
return rep->is_positive_definite (); }
220 double rcond (
void)
const {
return rep->rcond (); }
222 chol_type inverse (
void)
const;
bool is_positive_definite(void) const
virtual ~sparse_base_chol(void)
octave_idx_type P(void) const
sparse_base_chol(const chol_type &a, bool natural, bool force)
octave_refcount< int > count
octave_idx_type P(void) const
sparse_base_chol_rep * rep
bool is_positive_definite(void) const
sparse_base_chol_rep(const chol_type &a, octave_idx_type &info, bool natural, bool force)
ColumnVector perm(void) const
sparse_base_chol_rep(void)
SparseComplexMatrix hermitian(void) const
ColumnVector perm(void) const
sparse_base_chol(const sparse_base_chol< chol_type, chol_elt, p_type > &a)
F77_RET_T const octave_idx_type const octave_idx_type const octave_idx_type double const octave_idx_type double const octave_idx_type double * Q
~sparse_base_chol_rep(void)
sparse_base_chol(const chol_type &a, octave_idx_type &info, bool natural, bool force)
cholmod_sparse * L(void) const
sparse_base_chol_rep(const chol_type &a, bool natural, bool force)