Mercurial > hg > octave-lyh
diff src/sparse-xdiv.h @ 8965:42aff15e059b
Implement diag \ sparse and sparse / diag.
Not pretty, but somewhat efficient and preserves sparsity.
author | Jason Riedy <jason@acm.org> |
---|---|
date | Mon, 09 Mar 2009 17:49:14 -0400 |
parents | a1dbe9d80eee |
children | 16f53d29049f |
line wrap: on
line diff
--- a/src/sparse-xdiv.h +++ b/src/sparse-xdiv.h @@ -27,6 +27,8 @@ #include "oct-cmplx.h" #include "MatrixType.h" +class DiagMatrix; +class ComplexDiagMatrix; class SparseMatrix; class SparseComplexMatrix; @@ -47,6 +49,15 @@ extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, const SparseComplexMatrix& b, MatrixType &typ); +extern SparseMatrix xdiv (const SparseMatrix& a, + const DiagMatrix& b, MatrixType &typ); +extern SparseComplexMatrix xdiv (const SparseMatrix& a, + const ComplexDiagMatrix& b, MatrixType &typ); +extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, + const DiagMatrix& b, MatrixType &typ); +extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, + const ComplexDiagMatrix& b, MatrixType &typ); + extern Matrix x_el_div (double a, const SparseMatrix& b); extern ComplexMatrix x_el_div (double a, const SparseComplexMatrix& b); extern ComplexMatrix x_el_div (const Complex a, const SparseMatrix& b); @@ -71,6 +82,14 @@ extern SparseComplexMatrix xleftdiv (const SparseComplexMatrix& a, const SparseComplexMatrix& b, MatrixType &typ); +extern SparseMatrix xleftdiv (const DiagMatrix&, const SparseMatrix&, MatrixType&); +extern SparseComplexMatrix xleftdiv (const ComplexDiagMatrix&, const SparseMatrix&, + MatrixType&); +extern SparseComplexMatrix xleftdiv (const DiagMatrix&, const SparseComplexMatrix&, + MatrixType&); +extern SparseComplexMatrix xleftdiv (const ComplexDiagMatrix&, const SparseComplexMatrix&, + MatrixType&); + #endif /*