diff liboctave/dSparse.h @ 8968:91d53dc37f79

Add perm * sparse, perm \ sparse, sparse * perm, and sparse / perm operations. Nothing terribly fancy in any of this. There probably is some mechanism for using the permutation vectors and some assign or index method in the sparse classes, but I've never understood all the intricacies. I'm opting for a simple implementation at the cost of possibly duplicating some functionality.
author Jason Riedy <jason@acm.org>
date Tue, 10 Mar 2009 21:54:44 -0400
parents 1bba53c0a38d
children a5035bc7fbfb
line wrap: on
line diff
--- a/liboctave/dSparse.h	Thu Mar 12 11:46:56 2009 +0100
+++ b/liboctave/dSparse.h	Tue Mar 10 21:54:44 2009 -0400
@@ -36,6 +36,7 @@
 #include "Sparse-op-defs.h"
 #include "MatrixType.h"
 
+class PermMatrix;
 class DiagMatrix;
 class SparseComplexMatrix;
 class SparseBoolMatrix;
@@ -459,6 +460,9 @@
 extern OCTAVE_API SparseMatrix operator - (const DiagMatrix&, const SparseMatrix&);
 extern OCTAVE_API SparseMatrix operator - (const SparseMatrix&, const DiagMatrix&);
 
+extern OCTAVE_API SparseMatrix operator * (const PermMatrix&, const SparseMatrix&);
+extern OCTAVE_API SparseMatrix operator * (const SparseMatrix&, const PermMatrix&);
+
 extern OCTAVE_API SparseMatrix min (double d, const SparseMatrix& m);
 extern OCTAVE_API SparseMatrix min (const SparseMatrix& m, double d);
 extern OCTAVE_API SparseMatrix min (const SparseMatrix& a, const SparseMatrix& b);