diff liboctave/sparse-base-chol.h @ 15185:82d51d6e470c

Proceed with the sparse Choleski computation when requested (bug #37095) * chol.cc (Fchol): Pass nargout in the info paramter to the sparse Choleski objects. * sparse-base-chol.h (sparse_base_chol_rep::sparse_base_chol_rep): Pass the info (=nargout) paramter to the init function. (sparse_base_chol_rep::init): New nargout parameter * sparse-base-chol.cc (sparse_base_chol_rep::init): Also check for nargout to decide if should proceed with the cholmod computations or not. * sparse-util.cc (SparseCholError): Don't warn about CHOLMOD_NOT_POSDEF.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Tue, 14 Aug 2012 15:54:43 -0400
parents 460a3c6d8bf1
children 94cdf82d4a0c
line wrap: on
line diff
--- a/liboctave/sparse-base-chol.h
+++ b/liboctave/sparse-base-chol.h
@@ -53,7 +53,7 @@
       : count (1), Lsparse (0), Common (), is_pd (false), minor_p (0),
         perms (), cond (0)
       {
-        info = init (a, natural);
+        info = init (a, natural, info);
       }
 
     ~sparse_base_chol_rep (void)
@@ -93,7 +93,8 @@
 
     double cond;
 
-    octave_idx_type init (const chol_type& a, bool natural = true);
+    octave_idx_type init (const chol_type& a, bool natural = true,
+                          octave_idx_type nargout = 1);
 
     void drop_zeros (const cholmod_sparse* S);
 
@@ -113,12 +114,16 @@
     sparse_base_chol_rep (const chol_type& a,
                           const bool natural)
       : count (1), is_pd (false), minor_p (0), perms (), cond (0)
-      { init (a, natural); }
+      {
+        init (a, natural);
+      }
 
     sparse_base_chol_rep (const chol_type& a, octave_idx_type& info,
                           const bool natural)
       : count (1), is_pd (false), minor_p (0), perms (), cond (0)
-      { info = init (a, natural); }
+      {
+        info = init (a, natural, info);
+      }
 
     ~sparse_base_chol_rep (void) { }
 
@@ -143,7 +148,8 @@
 
     double cond;
 
-    octave_idx_type init (const chol_type& a, bool natural = true);
+    octave_idx_type init (const chol_type& a, bool natural = true,
+                          octave_idx_type nargout = 0);
 
     // No copying!