diff liboctave/dSparse.h @ 13030:b646413c3d0e

Make operators do smarter sparse conversions on permutation matrices. * Sparse.cc (Sparse<T>::Sparse): New templated ctor, plus two instantiations. * Sparse.h (Sparse<T>): Declare new ctor. * MSparse.h (MSparse): Give this class a PermMatrix ctor. * boolSparse.h (BoolSparseMatrix): Ditto. * dSparse.cc: Refactor PermMatrix ctor, moved into common parent class. * dSparse.h (SparseMatrix): Ditto. * op-pm-sm.cc: Declare and install smarter permutation matrix operators. * ov-perm.cc (octave_perm_matrix): Declare new virtual function override. * ov-perm.cc (sparse_bool_matrix_value): Override this virtual function.
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Tue, 30 Aug 2011 18:36:06 -0500
parents 12df7854fa7c
children 72c96de7a403
line wrap: on
line diff
--- a/liboctave/dSparse.h
+++ b/liboctave/dSparse.h
@@ -82,7 +82,7 @@
 
   explicit SparseMatrix (const DiagMatrix& a);
 
-  explicit SparseMatrix (const PermMatrix& a);
+  explicit SparseMatrix (const PermMatrix& a) : MSparse<double>(a) { }
 
   SparseMatrix (octave_idx_type r, octave_idx_type c, octave_idx_type num_nz) : MSparse<double> (r, c, num_nz) { }