diff liboctave/CSparse.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/CSparse.h
+++ b/liboctave/CSparse.h
@@ -37,6 +37,7 @@
 #include "Sparse-op-defs.h"
 #include "MatrixType.h"
 
+class PermMatrix;
 class DiagMatrix;
 class ComplexDiagMatrix;
 class SparseMatrix;
@@ -498,6 +499,11 @@
 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&, const DiagMatrix&);
 extern OCTAVE_API SparseComplexMatrix operator - (const SparseComplexMatrix&, const ComplexDiagMatrix&);
 
+extern OCTAVE_API SparseComplexMatrix operator * (const PermMatrix&,
+						  const SparseComplexMatrix&);
+extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,
+						  const PermMatrix&);
+
 extern OCTAVE_API SparseComplexMatrix min (const Complex& c, 
 				const SparseComplexMatrix& m);
 extern OCTAVE_API SparseComplexMatrix min (const SparseComplexMatrix& m,