Mercurial > octave-nkf
comparison src/OPERATORS/op-sm-cs.cc @ 5322:22994a5730f9
[project @ 2005-04-29 13:04:24 by dbateman]
author | dbateman |
---|---|
date | Fri, 29 Apr 2005 13:04:25 +0000 |
parents | 4c8a2e4e0717 |
children | 8d7162924bd3 |
comparison
equal
deleted
inserted
replaced
5321:84b72a402b86 | 5322:22994a5730f9 |
---|---|
70 return xpow (v1.matrix_value (), v2.complex_value ()); | 70 return xpow (v1.matrix_value (), v2.complex_value ()); |
71 } | 71 } |
72 | 72 |
73 DEFBINOP (ldiv, sparse_matrix, complex) | 73 DEFBINOP (ldiv, sparse_matrix, complex) |
74 { | 74 { |
75 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex&); | 75 CAST_BINOP_ARGS (octave_sparse_matrix&, const octave_complex&); |
76 | 76 |
77 SparseType typ = v1.sparse_type (); | |
77 SparseMatrix m1 = v1.sparse_matrix_value (); | 78 SparseMatrix m1 = v1.sparse_matrix_value (); |
78 ComplexMatrix m2 = ComplexMatrix (1, 1, v2.complex_value ()); | 79 ComplexMatrix m2 = ComplexMatrix (1, 1, v2.complex_value ()); |
80 ComplexMatrix ret = xleftdiv (m1, m2, typ); | |
81 v1.sparse_type (typ); | |
79 | 82 |
80 return xleftdiv (m1, m2); | 83 return ret; |
81 } | 84 } |
82 | 85 |
83 DEFBINOP_FN (lt, sparse_matrix, complex, mx_el_lt) | 86 DEFBINOP_FN (lt, sparse_matrix, complex, mx_el_lt) |
84 DEFBINOP_FN (le, sparse_matrix, complex, mx_el_le) | 87 DEFBINOP_FN (le, sparse_matrix, complex, mx_el_le) |
85 DEFBINOP_FN (eq, sparse_matrix, complex, mx_el_eq) | 88 DEFBINOP_FN (eq, sparse_matrix, complex, mx_el_eq) |