[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-octave-devel] Bug#350230: octave2.9: glpk() fails on sparse matrices



Package: octave2.9
Version: 2.9.4-11
Severity: normal
Tags: patch


glpk() fails on sparse matrices with a coredump, I have attached a patch
that fixes it.

Regards,
Kim Hansen

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (700, 'unstable')
Architecture: i386 (i586)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-486
Locale: LANG=en_DK, LC_CTYPE=da_DK (charmap=ISO-8859-1)
--- __glpk__.cc.orig	2006-01-28 03:18:23.000000000 +0000
+++ __glpk__.cc	2006-01-28 03:19:58.000000000 +0000
@@ -482,7 +482,7 @@
     }
   else
     {
-      SparseMatrix A (args(1).matrix_value ()); // get the sparse matrix
+      SparseMatrix A = args(1).sparse_matrix_value (); // get the sparse matrix
 
       if (error_state)
 	{
@@ -509,7 +509,7 @@
 	    nz++;
 	    rn(nz) = A.ridx(i) + 1;
 	    cn(nz) = j + 1;
-	    a(nz) = A(i,j);
+	    a(nz) = A.data(i);
 	  }
     }
 

Reply to: