comparison src/OPERATORS/op-s-scm.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 667ad2becb63
comparison
equal deleted inserted replaced
5321:84b72a402b86 5322:22994a5730f9
46 DEFBINOP_OP (sub, scalar, sparse_complex_matrix, -) 46 DEFBINOP_OP (sub, scalar, sparse_complex_matrix, -)
47 DEFBINOP_OP (mul, scalar, sparse_complex_matrix, *) 47 DEFBINOP_OP (mul, scalar, sparse_complex_matrix, *)
48 48
49 DEFBINOP (div, scalar, sparse_complex_matrix) 49 DEFBINOP (div, scalar, sparse_complex_matrix)
50 { 50 {
51 CAST_BINOP_ARGS (const octave_scalar&, 51 CAST_BINOP_ARGS (const octave_scalar&, octave_sparse_complex_matrix&);
52 const octave_sparse_complex_matrix&);
53 52
53 SparseType typ = v2.sparse_type ();
54 Matrix m1 = Matrix (1, 1, v1.scalar_value ()); 54 Matrix m1 = Matrix (1, 1, v1.scalar_value ());
55 SparseComplexMatrix m2 = v2.sparse_complex_matrix_value (); 55 SparseComplexMatrix m2 = v2.sparse_complex_matrix_value ();
56 ComplexMatrix ret = xdiv (m1, m2, typ);
57 v2.sparse_type (typ);
56 58
57 return xdiv (m1, m2); 59 return ret;
58 } 60 }
59 61
60 DEFBINOP (pow, scalar, sparse_complex_matrix) 62 DEFBINOP (pow, scalar, sparse_complex_matrix)
61 { 63 {
62 CAST_BINOP_ARGS (const octave_scalar&, 64 CAST_BINOP_ARGS (const octave_scalar&,