Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
8964:f4f4d65faaa0 | 8965:42aff15e059b |
---|---|
25 #define octave_sparse_xdiv_h 1 | 25 #define octave_sparse_xdiv_h 1 |
26 | 26 |
27 #include "oct-cmplx.h" | 27 #include "oct-cmplx.h" |
28 #include "MatrixType.h" | 28 #include "MatrixType.h" |
29 | 29 |
30 class DiagMatrix; | |
31 class ComplexDiagMatrix; | |
30 class SparseMatrix; | 32 class SparseMatrix; |
31 class SparseComplexMatrix; | 33 class SparseComplexMatrix; |
32 | 34 |
33 extern Matrix xdiv (const Matrix& a, const SparseMatrix& b, MatrixType &typ); | 35 extern Matrix xdiv (const Matrix& a, const SparseMatrix& b, MatrixType &typ); |
34 extern ComplexMatrix xdiv (const Matrix& a, const SparseComplexMatrix& b, | 36 extern ComplexMatrix xdiv (const Matrix& a, const SparseComplexMatrix& b, |
44 const SparseComplexMatrix& b, MatrixType &typ); | 46 const SparseComplexMatrix& b, MatrixType &typ); |
45 extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, | 47 extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, |
46 const SparseMatrix& b, MatrixType &typ); | 48 const SparseMatrix& b, MatrixType &typ); |
47 extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, | 49 extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, |
48 const SparseComplexMatrix& b, MatrixType &typ); | 50 const SparseComplexMatrix& b, MatrixType &typ); |
51 | |
52 extern SparseMatrix xdiv (const SparseMatrix& a, | |
53 const DiagMatrix& b, MatrixType &typ); | |
54 extern SparseComplexMatrix xdiv (const SparseMatrix& a, | |
55 const ComplexDiagMatrix& b, MatrixType &typ); | |
56 extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, | |
57 const DiagMatrix& b, MatrixType &typ); | |
58 extern SparseComplexMatrix xdiv (const SparseComplexMatrix& a, | |
59 const ComplexDiagMatrix& b, MatrixType &typ); | |
49 | 60 |
50 extern Matrix x_el_div (double a, const SparseMatrix& b); | 61 extern Matrix x_el_div (double a, const SparseMatrix& b); |
51 extern ComplexMatrix x_el_div (double a, const SparseComplexMatrix& b); | 62 extern ComplexMatrix x_el_div (double a, const SparseComplexMatrix& b); |
52 extern ComplexMatrix x_el_div (const Complex a, const SparseMatrix& b); | 63 extern ComplexMatrix x_el_div (const Complex a, const SparseMatrix& b); |
53 extern ComplexMatrix x_el_div (const Complex a, | 64 extern ComplexMatrix x_el_div (const Complex a, |
69 extern SparseComplexMatrix xleftdiv (const SparseComplexMatrix& a, | 80 extern SparseComplexMatrix xleftdiv (const SparseComplexMatrix& a, |
70 const SparseMatrix& b, MatrixType &typ); | 81 const SparseMatrix& b, MatrixType &typ); |
71 extern SparseComplexMatrix xleftdiv (const SparseComplexMatrix& a, | 82 extern SparseComplexMatrix xleftdiv (const SparseComplexMatrix& a, |
72 const SparseComplexMatrix& b, MatrixType &typ); | 83 const SparseComplexMatrix& b, MatrixType &typ); |
73 | 84 |
85 extern SparseMatrix xleftdiv (const DiagMatrix&, const SparseMatrix&, MatrixType&); | |
86 extern SparseComplexMatrix xleftdiv (const ComplexDiagMatrix&, const SparseMatrix&, | |
87 MatrixType&); | |
88 extern SparseComplexMatrix xleftdiv (const DiagMatrix&, const SparseComplexMatrix&, | |
89 MatrixType&); | |
90 extern SparseComplexMatrix xleftdiv (const ComplexDiagMatrix&, const SparseComplexMatrix&, | |
91 MatrixType&); | |
92 | |
74 #endif | 93 #endif |
75 | 94 |
76 /* | 95 /* |
77 ;;; Local Variables: *** | 96 ;;; Local Variables: *** |
78 ;;; mode: C++ *** | 97 ;;; mode: C++ *** |