Mercurial > hg > octave-terminal
changeset 5511:e67d027ff4e3
[project @ 2005-10-26 21:13:56 by dbateman]
author | dbateman |
---|---|
date | Wed, 26 Oct 2005 21:13:57 +0000 |
parents | 3fadccb05d5d |
children | 7c8767d0ffc0 |
files | liboctave/ChangeLog liboctave/sparse-base-chol.cc liboctave/sparse-base-chol.h |
diffstat | 3 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2005-10-26 David Bateman <dbateman@free.fr> + + * sparse-base-chol.h: Include cholmod specific code in HAVE_CHOLMOD + * sparse-base-chol.cc: ditto. + 2005-10-26 John W. Eaton <jwe@octave.org> Changes for GCC 4.1, tip from Arno J. Klaassen
--- a/liboctave/sparse-base-chol.cc +++ b/liboctave/sparse-base-chol.cc @@ -32,6 +32,7 @@ #include "quit.h" #include "SparseType.h" +#ifdef HAVE_CHOLMOD // Can't use CHOLMOD_NAME(drop)(0.0, S, cm). It doesn't treat complex matrices template <class chol_type, class chol_elt, class p_type> void @@ -73,6 +74,7 @@ } Sp [ncol] = pdest; } +#endif template <class chol_type, class chol_elt, class p_type> octave_idx_type
--- a/liboctave/sparse-base-chol.h +++ b/liboctave/sparse-base-chol.h @@ -38,9 +38,12 @@ class sparse_base_chol_rep { public: +#ifdef HAVE_CHOLMOD sparse_base_chol_rep (void) : count (1), Lsparse (NULL), is_pd (false), minor_p (0) { } - +#else + sparse_base_chol_rep (void) : count (1), is_pd (false), minor_p (0) { } +#endif sparse_base_chol_rep (const chol_type& a, const bool natural) : count (1) { init (a, natural); } @@ -49,15 +52,14 @@ const bool natural) : count (1) { info = init (a, natural); } -#ifndef HAVE_CHOLMOD - ~sparse_base_chol_rep (void) { } -#else +#ifdef HAVE_CHOLMOD ~sparse_base_chol_rep (void) { CHOLMOD_NAME(free_sparse) (&Lsparse, &Common); } -#endif cholmod_sparse * L (void) const { return Lsparse; } - +#else + ~sparse_base_chol_rep (void) { } +#endif octave_idx_type P (void) const { return (minor_p == static_cast<octave_idx_type>(Lsparse->ncol) ? 0 : minor_p + 1); } @@ -73,10 +75,11 @@ int count; private: +#ifdef HAVE_CHOLMOD cholmod_sparse *Lsparse; cholmod_common Common; - +#endif bool is_pd; octave_idx_type minor_p;