diff liboctave/CSparse.cc @ 5429:2042301733ce

[project @ 2005-08-25 12:21:24 by dbateman]
author dbateman
date Thu, 25 Aug 2005 12:21:24 +0000
parents b91241999ba6
children ed08548b9054
line wrap: on
line diff
--- a/liboctave/CSparse.cc
+++ b/liboctave/CSparse.cc
@@ -6361,6 +6361,54 @@
 #endif
 }
 
+ComplexMatrix
+operator * (const ComplexMatrix& m, const SparseMatrix& a)
+{
+  SparseComplexMatrix tmp (a);
+  return m * tmp;
+}
+
+ComplexMatrix
+operator * (const Matrix& m, const SparseComplexMatrix& a)
+{
+  ComplexMatrix tmp (m);
+  return tmp * a;
+}
+
+ComplexMatrix
+operator * (const ComplexMatrix& m, const SparseComplexMatrix& a)
+{
+#ifdef HAVE_SPARSE_BLAS
+  // XXX FIXME XXX Isn't there a sparse BLAS ??
+#else
+  FULL_SPARSE_MUL (ComplexMatrix, Complex);
+#endif
+}
+
+ComplexMatrix
+operator * (const SparseComplexMatrix& m, const Matrix& a)
+{
+  ComplexMatrix tmp (a);
+  return m * tmp;
+}
+
+ComplexMatrix
+operator * (const SparseMatrix& m, const ComplexMatrix& a)
+{
+  SparseComplexMatrix tmp (m);
+  return tmp * a;
+}
+
+ComplexMatrix
+operator * (const SparseComplexMatrix& m, const ComplexMatrix& a)
+{
+#ifdef HAVE_SPARSE_BLAS
+  // XXX FIXME XXX Isn't there a sparse BLAS ??
+#else
+  SPARSE_FULL_MUL (ComplexMatrix, Complex);
+#endif
+}
+
 // XXX FIXME XXX -- it would be nice to share code among the min/max
 // functions below.