comparison libinterp/operators/op-dm-scm.cc @ 17787:175b392e91fe

Use GNU style coding conventions for code in libinterp/ * libinterp/corefcn/Cell.h, libinterp/corefcn/__contourc__.cc, libinterp/corefcn/__dispatch__.cc, libinterp/corefcn/__lin_interpn__.cc, libinterp/corefcn/__pchip_deriv__.cc, libinterp/corefcn/__qp__.cc, libinterp/corefcn/balance.cc, libinterp/corefcn/besselj.cc, libinterp/corefcn/betainc.cc, libinterp/corefcn/bitfcns.cc, libinterp/corefcn/bsxfun.cc, libinterp/corefcn/c-file-ptr-stream.cc, libinterp/corefcn/c-file-ptr-stream.h, libinterp/corefcn/cellfun.cc, libinterp/corefcn/colloc.cc, libinterp/corefcn/comment-list.h, libinterp/corefcn/conv2.cc, libinterp/corefcn/daspk.cc, libinterp/corefcn/dasrt.cc, libinterp/corefcn/dassl.cc, libinterp/corefcn/data.cc, libinterp/corefcn/debug.cc, libinterp/corefcn/defaults.cc, libinterp/corefcn/defaults.in.h, libinterp/corefcn/defun-int.h, libinterp/corefcn/defun.cc, libinterp/corefcn/det.cc, libinterp/corefcn/dirfns.cc, libinterp/corefcn/display.cc, libinterp/corefcn/dlmread.cc, libinterp/corefcn/dot.cc, libinterp/corefcn/dynamic-ld.cc, libinterp/corefcn/dynamic-ld.h, libinterp/corefcn/eig.cc, libinterp/corefcn/ellipj.cc, libinterp/corefcn/error.cc, libinterp/corefcn/error.h, libinterp/corefcn/event-queue.h, libinterp/corefcn/fft.cc, libinterp/corefcn/fft2.cc, libinterp/corefcn/fftn.cc, libinterp/corefcn/file-io.cc, libinterp/corefcn/filter.cc, libinterp/corefcn/find.cc, libinterp/corefcn/gammainc.cc, libinterp/corefcn/gcd.cc, libinterp/corefcn/getgrent.cc, libinterp/corefcn/getpwent.cc, libinterp/corefcn/getrusage.cc, libinterp/corefcn/givens.cc, libinterp/corefcn/gl-render.cc, libinterp/corefcn/gl2ps-renderer.cc, libinterp/corefcn/gl2ps-renderer.h, libinterp/corefcn/graphics.cc, libinterp/corefcn/graphics.in.h, libinterp/corefcn/gripes.cc, libinterp/corefcn/gripes.h, libinterp/corefcn/help.cc, libinterp/corefcn/hess.cc, libinterp/corefcn/hex2num.cc, libinterp/corefcn/input.cc, libinterp/corefcn/input.h, libinterp/corefcn/inv.cc, libinterp/corefcn/jit-ir.h, libinterp/corefcn/jit-typeinfo.cc, libinterp/corefcn/jit-typeinfo.h, libinterp/corefcn/jit-util.h, libinterp/corefcn/kron.cc, libinterp/corefcn/load-path.cc, libinterp/corefcn/load-path.h, libinterp/corefcn/load-save.cc, libinterp/corefcn/load-save.h, libinterp/corefcn/lookup.cc, libinterp/corefcn/ls-ascii-helper.cc, libinterp/corefcn/ls-hdf5.cc, libinterp/corefcn/ls-hdf5.h, libinterp/corefcn/ls-mat-ascii.cc, libinterp/corefcn/ls-mat-ascii.h, libinterp/corefcn/ls-mat4.cc, libinterp/corefcn/ls-mat5.cc, libinterp/corefcn/ls-mat5.h, libinterp/corefcn/ls-oct-ascii.cc, libinterp/corefcn/lsode.cc, libinterp/corefcn/lu.cc, libinterp/corefcn/luinc.cc, libinterp/corefcn/mappers.cc, libinterp/corefcn/matrix_type.cc, libinterp/corefcn/max.cc, libinterp/corefcn/md5sum.cc, libinterp/corefcn/mex.cc, libinterp/corefcn/mexproto.h, libinterp/corefcn/mgorth.cc, libinterp/corefcn/mxarray.in.h, libinterp/corefcn/nproc.cc, libinterp/corefcn/oct-hist.cc, libinterp/corefcn/oct-lvalue.h, libinterp/corefcn/oct-map.cc, libinterp/corefcn/oct-map.h, libinterp/corefcn/oct-obj.h, libinterp/corefcn/oct-prcstrm.h, libinterp/corefcn/oct-stdstrm.h, libinterp/corefcn/oct-stream.cc, libinterp/corefcn/oct-stream.h, libinterp/corefcn/octave-link.cc, libinterp/corefcn/octave-link.h, libinterp/corefcn/pager.cc, libinterp/corefcn/pinv.cc, libinterp/corefcn/pr-output.cc, libinterp/corefcn/procstream.h, libinterp/corefcn/profiler.cc, libinterp/corefcn/pt-jit.cc, libinterp/corefcn/pt-jit.h, libinterp/corefcn/quad.cc, libinterp/corefcn/quadcc.cc, libinterp/corefcn/qz.cc, libinterp/corefcn/rand.cc, libinterp/corefcn/rcond.cc, libinterp/corefcn/regexp.cc, libinterp/corefcn/schur.cc, libinterp/corefcn/sighandlers.cc, libinterp/corefcn/sighandlers.h, libinterp/corefcn/sparse-xdiv.cc, libinterp/corefcn/sparse-xdiv.h, libinterp/corefcn/sparse-xpow.cc, libinterp/corefcn/sparse.cc, libinterp/corefcn/spparms.cc, libinterp/corefcn/sqrtm.cc, libinterp/corefcn/str2double.cc, libinterp/corefcn/strfind.cc, libinterp/corefcn/strfns.cc, libinterp/corefcn/sub2ind.cc, libinterp/corefcn/svd.cc, libinterp/corefcn/syl.cc, libinterp/corefcn/symtab.cc, libinterp/corefcn/symtab.h, libinterp/corefcn/syscalls.cc, libinterp/corefcn/sysdep.cc, libinterp/corefcn/sysdep.h, libinterp/corefcn/time.cc, libinterp/corefcn/toplev.cc, libinterp/corefcn/toplev.h, libinterp/corefcn/tril.cc, libinterp/corefcn/txt-eng-ft.cc, libinterp/corefcn/txt-eng-ft.h, libinterp/corefcn/txt-eng.h, libinterp/corefcn/typecast.cc, libinterp/corefcn/urlwrite.cc, libinterp/corefcn/utils.cc, libinterp/corefcn/variables.cc, libinterp/corefcn/variables.h, libinterp/corefcn/xdiv.cc, libinterp/corefcn/xdiv.h, libinterp/corefcn/xnorm.h, libinterp/corefcn/xpow.cc, libinterp/corefcn/xpow.h, libinterp/corefcn/zfstream.cc, libinterp/corefcn/zfstream.h, libinterp/dldfcn/__delaunayn__.cc, libinterp/dldfcn/__dsearchn__.cc, libinterp/dldfcn/__eigs__.cc, libinterp/dldfcn/__fltk_uigetfile__.cc, libinterp/dldfcn/__glpk__.cc, libinterp/dldfcn/__init_fltk__.cc, libinterp/dldfcn/__init_gnuplot__.cc, libinterp/dldfcn/__magick_read__.cc, libinterp/dldfcn/__voronoi__.cc, libinterp/dldfcn/amd.cc, libinterp/dldfcn/ccolamd.cc, libinterp/dldfcn/chol.cc, libinterp/dldfcn/colamd.cc, libinterp/dldfcn/convhulln.cc, libinterp/dldfcn/dmperm.cc, libinterp/dldfcn/fftw.cc, libinterp/dldfcn/qr.cc, libinterp/dldfcn/symbfact.cc, libinterp/dldfcn/symrcm.cc, libinterp/dldfcn/tsearch.cc, libinterp/octave-value/ov-base-diag.cc, libinterp/octave-value/ov-base-diag.h, libinterp/octave-value/ov-base-int.cc, libinterp/octave-value/ov-base-int.h, libinterp/octave-value/ov-base-mat.h, libinterp/octave-value/ov-base-scalar.cc, libinterp/octave-value/ov-base-scalar.h, libinterp/octave-value/ov-base-sparse.cc, libinterp/octave-value/ov-base-sparse.h, libinterp/octave-value/ov-base.cc, libinterp/octave-value/ov-base.h, libinterp/octave-value/ov-bool-mat.cc, libinterp/octave-value/ov-bool-mat.h, libinterp/octave-value/ov-bool-sparse.cc, libinterp/octave-value/ov-bool-sparse.h, libinterp/octave-value/ov-bool.cc, libinterp/octave-value/ov-bool.h, libinterp/octave-value/ov-builtin.cc, libinterp/octave-value/ov-builtin.h, libinterp/octave-value/ov-cell.cc, libinterp/octave-value/ov-cell.h, libinterp/octave-value/ov-ch-mat.cc, libinterp/octave-value/ov-ch-mat.h, libinterp/octave-value/ov-class.cc, libinterp/octave-value/ov-class.h, libinterp/octave-value/ov-colon.h, libinterp/octave-value/ov-complex.cc, libinterp/octave-value/ov-complex.h, libinterp/octave-value/ov-cx-diag.cc, libinterp/octave-value/ov-cx-diag.h, libinterp/octave-value/ov-cx-mat.cc, libinterp/octave-value/ov-cx-mat.h, libinterp/octave-value/ov-cx-sparse.cc, libinterp/octave-value/ov-cx-sparse.h, libinterp/octave-value/ov-dld-fcn.h, libinterp/octave-value/ov-fcn-handle.cc, libinterp/octave-value/ov-fcn-handle.h, libinterp/octave-value/ov-fcn-inline.cc, libinterp/octave-value/ov-fcn-inline.h, libinterp/octave-value/ov-fcn.h, libinterp/octave-value/ov-float.cc, libinterp/octave-value/ov-float.h, libinterp/octave-value/ov-flt-complex.cc, libinterp/octave-value/ov-flt-complex.h, libinterp/octave-value/ov-flt-cx-diag.cc, libinterp/octave-value/ov-flt-cx-diag.h, libinterp/octave-value/ov-flt-cx-mat.cc, libinterp/octave-value/ov-flt-cx-mat.h, libinterp/octave-value/ov-flt-re-diag.cc, libinterp/octave-value/ov-flt-re-diag.h, libinterp/octave-value/ov-flt-re-mat.cc, libinterp/octave-value/ov-flt-re-mat.h, libinterp/octave-value/ov-int16.cc, libinterp/octave-value/ov-int32.cc, libinterp/octave-value/ov-int64.cc, libinterp/octave-value/ov-int8.cc, libinterp/octave-value/ov-intx.h, libinterp/octave-value/ov-java.cc, libinterp/octave-value/ov-lazy-idx.h, libinterp/octave-value/ov-mex-fcn.cc, libinterp/octave-value/ov-mex-fcn.h, libinterp/octave-value/ov-null-mat.cc, libinterp/octave-value/ov-null-mat.h, libinterp/octave-value/ov-oncleanup.cc, libinterp/octave-value/ov-perm.cc, libinterp/octave-value/ov-perm.h, libinterp/octave-value/ov-range.cc, libinterp/octave-value/ov-range.h, libinterp/octave-value/ov-re-diag.cc, libinterp/octave-value/ov-re-diag.h, libinterp/octave-value/ov-re-mat.cc, libinterp/octave-value/ov-re-mat.h, libinterp/octave-value/ov-re-sparse.cc, libinterp/octave-value/ov-re-sparse.h, libinterp/octave-value/ov-scalar.cc, libinterp/octave-value/ov-scalar.h, libinterp/octave-value/ov-str-mat.cc, libinterp/octave-value/ov-str-mat.h, libinterp/octave-value/ov-struct.cc, libinterp/octave-value/ov-struct.h, libinterp/octave-value/ov-type-conv.h, libinterp/octave-value/ov-typeinfo.cc, libinterp/octave-value/ov-typeinfo.h, libinterp/octave-value/ov-uint16.cc, libinterp/octave-value/ov-uint32.cc, libinterp/octave-value/ov-uint64.cc, libinterp/octave-value/ov-uint8.cc, libinterp/octave-value/ov-usr-fcn.cc, libinterp/octave-value/ov-usr-fcn.h, libinterp/octave-value/ov.cc, libinterp/octave-value/ov.h, libinterp/octave.cc, libinterp/operators/op-b-bm.cc, libinterp/operators/op-b-sbm.cc, libinterp/operators/op-bm-b.cc, libinterp/operators/op-bm-bm.cc, libinterp/operators/op-cdm-cdm.cc, libinterp/operators/op-chm.cc, libinterp/operators/op-class.cc, libinterp/operators/op-cm-cm.cc, libinterp/operators/op-cm-cs.cc, libinterp/operators/op-cm-s.cc, libinterp/operators/op-cm-scm.cc, libinterp/operators/op-cm-sm.cc, libinterp/operators/op-cs-cm.cc, libinterp/operators/op-cs-cs.cc, libinterp/operators/op-cs-scm.cc, libinterp/operators/op-cs-sm.cc, libinterp/operators/op-dm-dm.cc, libinterp/operators/op-dm-scm.cc, libinterp/operators/op-double-conv.cc, libinterp/operators/op-fcdm-fcdm.cc, libinterp/operators/op-fcm-fcm.cc, libinterp/operators/op-fcm-fcs.cc, libinterp/operators/op-fcm-fm.cc, libinterp/operators/op-fcm-fs.cc, libinterp/operators/op-fcs-fcm.cc, libinterp/operators/op-fcs-fcs.cc, libinterp/operators/op-fcs-fm.cc, libinterp/operators/op-fcs-fs.cc, libinterp/operators/op-fdm-fdm.cc, libinterp/operators/op-float-conv.cc, libinterp/operators/op-fm-fcm.cc, libinterp/operators/op-fm-fcs.cc, libinterp/operators/op-fm-fm.cc, libinterp/operators/op-fm-fs.cc, libinterp/operators/op-fs-fcm.cc, libinterp/operators/op-fs-fcs.cc, libinterp/operators/op-fs-fm.cc, libinterp/operators/op-fs-fs.cc, libinterp/operators/op-m-cm.cc, libinterp/operators/op-m-cs.cc, libinterp/operators/op-m-m.cc, libinterp/operators/op-m-s.cc, libinterp/operators/op-m-scm.cc, libinterp/operators/op-m-sm.cc, libinterp/operators/op-pm-scm.cc, libinterp/operators/op-range.cc, libinterp/operators/op-s-cm.cc, libinterp/operators/op-s-cs.cc, libinterp/operators/op-s-scm.cc, libinterp/operators/op-sbm-b.cc, libinterp/operators/op-sbm-bm.cc, libinterp/operators/op-sbm-sbm.cc, libinterp/operators/op-scm-cm.cc, libinterp/operators/op-scm-cs.cc, libinterp/operators/op-scm-m.cc, libinterp/operators/op-scm-s.cc, libinterp/operators/op-scm-scm.cc, libinterp/operators/op-scm-sm.cc, libinterp/operators/op-sm-cm.cc, libinterp/operators/op-sm-m.cc, libinterp/operators/op-sm-s.cc, libinterp/operators/op-sm-scm.cc, libinterp/operators/op-sm-sm.cc, libinterp/operators/op-str-m.cc, libinterp/operators/op-str-s.cc, libinterp/operators/op-str-str.cc, libinterp/operators/ops.h, libinterp/parse-tree/lex.h, libinterp/parse-tree/parse.h, libinterp/parse-tree/pt-arg-list.cc, libinterp/parse-tree/pt-arg-list.h, libinterp/parse-tree/pt-assign.cc, libinterp/parse-tree/pt-assign.h, libinterp/parse-tree/pt-binop.cc, libinterp/parse-tree/pt-binop.h, libinterp/parse-tree/pt-bp.h, libinterp/parse-tree/pt-cbinop.cc, libinterp/parse-tree/pt-check.cc, libinterp/parse-tree/pt-colon.cc, libinterp/parse-tree/pt-colon.h, libinterp/parse-tree/pt-const.cc, libinterp/parse-tree/pt-decl.cc, libinterp/parse-tree/pt-decl.h, libinterp/parse-tree/pt-eval.cc, libinterp/parse-tree/pt-except.h, libinterp/parse-tree/pt-exp.h, libinterp/parse-tree/pt-fcn-handle.cc, libinterp/parse-tree/pt-id.cc, libinterp/parse-tree/pt-id.h, libinterp/parse-tree/pt-idx.cc, libinterp/parse-tree/pt-idx.h, libinterp/parse-tree/pt-loop.h, libinterp/parse-tree/pt-mat.cc, libinterp/parse-tree/pt-misc.cc, libinterp/parse-tree/pt-misc.h, libinterp/parse-tree/pt-pr-code.cc, libinterp/parse-tree/pt-select.h, libinterp/parse-tree/pt-stmt.h, libinterp/parse-tree/token.h, libinterp/version.cc: Use GNU style coding conventions for code in libinterp/
author Rik <rik@octave.org>
date Mon, 28 Oct 2013 19:51:46 -0700
parents d63878346099
children 65554f5847ac
comparison
equal deleted inserted replaced
17786:34d9812a943b 17787:175b392e91fe
39 39
40 // diagonal matrix by sparse matrix ops 40 // diagonal matrix by sparse matrix ops
41 41
42 DEFBINOP (mul_dm_scm, diag_matrix, sparse_complex_matrix) 42 DEFBINOP (mul_dm_scm, diag_matrix, sparse_complex_matrix)
43 { 43 {
44 CAST_BINOP_ARGS (const octave_diag_matrix&, const octave_sparse_complex_matrix&); 44 CAST_BINOP_ARGS (const octave_diag_matrix&,
45 const octave_sparse_complex_matrix&);
45 46
46 if (v2.rows () == 1 && v2.columns () == 1) 47 if (v2.rows () == 1 && v2.columns () == 1)
47 // If v2 is a scalar in disguise, return a diagonal matrix rather than 48 // If v2 is a scalar in disguise, return a diagonal matrix rather than
48 // a sparse matrix. 49 // a sparse matrix.
49 { 50 {
52 return octave_value (v1.diag_matrix_value () * d); 53 return octave_value (v1.diag_matrix_value () * d);
53 } 54 }
54 else 55 else
55 { 56 {
56 MatrixType typ = v2.matrix_type (); 57 MatrixType typ = v2.matrix_type ();
57 SparseComplexMatrix ret = v1.diag_matrix_value () * v2.sparse_complex_matrix_value (); 58 SparseComplexMatrix ret = v1.diag_matrix_value () *
59 v2.sparse_complex_matrix_value ();
58 octave_value out = octave_value (ret); 60 octave_value out = octave_value (ret);
59 typ.mark_as_unsymmetric (); 61 typ.mark_as_unsymmetric ();
60 out.matrix_type (typ); 62 out.matrix_type (typ);
61 return out; 63 return out;
62 } 64 }
63 } 65 }
64 66
65 DEFBINOP (mul_cdm_sm, complex_diag_matrix, sparse_matrix) 67 DEFBINOP (mul_cdm_sm, complex_diag_matrix, sparse_matrix)
66 { 68 {
67 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_matrix&); 69 CAST_BINOP_ARGS (const octave_complex_diag_matrix&,
70 const octave_sparse_matrix&);
68 71
69 if (v2.rows () == 1 && v2.columns () == 1) 72 if (v2.rows () == 1 && v2.columns () == 1)
70 // If v2 is a scalar in disguise, return a diagonal matrix rather than 73 // If v2 is a scalar in disguise, return a diagonal matrix rather than
71 // a sparse matrix. 74 // a sparse matrix.
72 { 75 {
75 return octave_value (v1.complex_diag_matrix_value () * d); 78 return octave_value (v1.complex_diag_matrix_value () * d);
76 } 79 }
77 else 80 else
78 { 81 {
79 MatrixType typ = v2.matrix_type (); 82 MatrixType typ = v2.matrix_type ();
80 SparseComplexMatrix ret = v1.complex_diag_matrix_value () * v2.sparse_matrix_value (); 83 SparseComplexMatrix ret = v1.complex_diag_matrix_value () *
84 v2.sparse_matrix_value ();
81 octave_value out = octave_value (ret); 85 octave_value out = octave_value (ret);
82 typ.mark_as_unsymmetric (); 86 typ.mark_as_unsymmetric ();
83 out.matrix_type (typ); 87 out.matrix_type (typ);
84 return out; 88 return out;
85 } 89 }
86 } 90 }
87 91
88 DEFBINOP (mul_cdm_scm, complex_diag_matrix, sparse_complex_matrix) 92 DEFBINOP (mul_cdm_scm, complex_diag_matrix, sparse_complex_matrix)
89 { 93 {
90 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_complex_matrix&); 94 CAST_BINOP_ARGS (const octave_complex_diag_matrix&,
95 const octave_sparse_complex_matrix&);
91 96
92 if (v2.rows () == 1 && v2.columns () == 1) 97 if (v2.rows () == 1 && v2.columns () == 1)
93 // If v2 is a scalar in disguise, return a diagonal matrix rather than 98 // If v2 is a scalar in disguise, return a diagonal matrix rather than
94 // a sparse matrix. 99 // a sparse matrix.
95 { 100 {
98 return octave_value (v1.complex_diag_matrix_value () * d); 103 return octave_value (v1.complex_diag_matrix_value () * d);
99 } 104 }
100 else 105 else
101 { 106 {
102 MatrixType typ = v2.matrix_type (); 107 MatrixType typ = v2.matrix_type ();
103 SparseComplexMatrix ret = v1.complex_diag_matrix_value () * v2.sparse_complex_matrix_value (); 108 SparseComplexMatrix ret = v1.complex_diag_matrix_value () *
109 v2.sparse_complex_matrix_value ();
104 octave_value out = octave_value (ret); 110 octave_value out = octave_value (ret);
105 typ.mark_as_unsymmetric (); 111 typ.mark_as_unsymmetric ();
106 out.matrix_type (typ); 112 out.matrix_type (typ);
107 return out; 113 return out;
108 } 114 }
132 { 138 {
133 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, 139 CAST_BINOP_ARGS (const octave_complex_diag_matrix&,
134 const octave_sparse_complex_matrix&); 140 const octave_sparse_complex_matrix&);
135 141
136 MatrixType typ = v2.matrix_type (); 142 MatrixType typ = v2.matrix_type ();
137 return xleftdiv (v1.complex_diag_matrix_value (), v2.sparse_complex_matrix_value (), 143 return xleftdiv (v1.complex_diag_matrix_value (),
144 v2.sparse_complex_matrix_value (),
138 typ); 145 typ);
139 } 146 }
140 147
141 DEFBINOP (add_dm_scm, diag_matrix, sparse_complex_matrix) 148 DEFBINOP (add_dm_scm, diag_matrix, sparse_complex_matrix)
142 { 149 {
143 CAST_BINOP_ARGS (const octave_diag_matrix&, const octave_sparse_complex_matrix&); 150 CAST_BINOP_ARGS (const octave_diag_matrix&,
151 const octave_sparse_complex_matrix&);
144 152
145 if (v2.rows () == 1 && v2.columns () == 1) 153 if (v2.rows () == 1 && v2.columns () == 1)
146 // If v2 is a scalar in disguise, return a diagonal matrix rather than 154 // If v2 is a scalar in disguise, return a diagonal matrix rather than
147 // a sparse matrix. 155 // a sparse matrix.
148 { 156 {
154 return v1.diag_matrix_value () + v2.sparse_complex_matrix_value (); 162 return v1.diag_matrix_value () + v2.sparse_complex_matrix_value ();
155 } 163 }
156 164
157 DEFBINOP (add_cdm_sm, complex_diag_matrix, sparse_matrix) 165 DEFBINOP (add_cdm_sm, complex_diag_matrix, sparse_matrix)
158 { 166 {
159 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_matrix&); 167 CAST_BINOP_ARGS (const octave_complex_diag_matrix&,
168 const octave_sparse_matrix&);
160 169
161 if (v2.rows () == 1 && v2.columns () == 1) 170 if (v2.rows () == 1 && v2.columns () == 1)
162 // If v2 is a scalar in disguise, return a diagonal matrix rather than 171 // If v2 is a scalar in disguise, return a diagonal matrix rather than
163 // a sparse matrix. 172 // a sparse matrix.
164 { 173 {
170 return v1.complex_diag_matrix_value () + v2.sparse_matrix_value (); 179 return v1.complex_diag_matrix_value () + v2.sparse_matrix_value ();
171 } 180 }
172 181
173 DEFBINOP (add_cdm_scm, complex_diag_matrix, sparse_complex_matrix) 182 DEFBINOP (add_cdm_scm, complex_diag_matrix, sparse_complex_matrix)
174 { 183 {
175 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_complex_matrix&); 184 CAST_BINOP_ARGS (const octave_complex_diag_matrix&,
185 const octave_sparse_complex_matrix&);
176 186
177 if (v2.rows () == 1 && v2.columns () == 1) 187 if (v2.rows () == 1 && v2.columns () == 1)
178 // If v2 is a scalar in disguise, return a diagonal matrix rather than 188 // If v2 is a scalar in disguise, return a diagonal matrix rather than
179 // a sparse matrix. 189 // a sparse matrix.
180 { 190 {
186 return v1.complex_diag_matrix_value () + v2.sparse_complex_matrix_value (); 196 return v1.complex_diag_matrix_value () + v2.sparse_complex_matrix_value ();
187 } 197 }
188 198
189 DEFBINOP (sub_dm_scm, diag_matrix, sparse_complex_matrix) 199 DEFBINOP (sub_dm_scm, diag_matrix, sparse_complex_matrix)
190 { 200 {
191 CAST_BINOP_ARGS (const octave_diag_matrix&, const octave_sparse_complex_matrix&); 201 CAST_BINOP_ARGS (const octave_diag_matrix&,
202 const octave_sparse_complex_matrix&);
192 203
193 if (v2.rows () == 1 && v2.columns () == 1) 204 if (v2.rows () == 1 && v2.columns () == 1)
194 // If v2 is a scalar in disguise, return a diagonal matrix rather than 205 // If v2 is a scalar in disguise, return a diagonal matrix rather than
195 // a sparse matrix. 206 // a sparse matrix.
196 { 207 {
202 return v1.diag_matrix_value () - v2.sparse_complex_matrix_value (); 213 return v1.diag_matrix_value () - v2.sparse_complex_matrix_value ();
203 } 214 }
204 215
205 DEFBINOP (sub_cdm_sm, complex_diag_matrix, sparse_matrix) 216 DEFBINOP (sub_cdm_sm, complex_diag_matrix, sparse_matrix)
206 { 217 {
207 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_matrix&); 218 CAST_BINOP_ARGS (const octave_complex_diag_matrix&,
219 const octave_sparse_matrix&);
208 220
209 if (v2.rows () == 1 && v2.columns () == 1) 221 if (v2.rows () == 1 && v2.columns () == 1)
210 // If v2 is a scalar in disguise, return a diagonal matrix rather than 222 // If v2 is a scalar in disguise, return a diagonal matrix rather than
211 // a sparse matrix. 223 // a sparse matrix.
212 { 224 {
218 return v1.complex_diag_matrix_value () - v2.sparse_matrix_value (); 230 return v1.complex_diag_matrix_value () - v2.sparse_matrix_value ();
219 } 231 }
220 232
221 DEFBINOP (sub_cdm_scm, complex_diag_matrix, sparse_complex_matrix) 233 DEFBINOP (sub_cdm_scm, complex_diag_matrix, sparse_complex_matrix)
222 { 234 {
223 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_complex_matrix&); 235 CAST_BINOP_ARGS (const octave_complex_diag_matrix&,
236 const octave_sparse_complex_matrix&);
224 237
225 if (v2.rows () == 1 && v2.columns () == 1) 238 if (v2.rows () == 1 && v2.columns () == 1)
226 // If v2 is a scalar in disguise, return a diagonal matrix rather than 239 // If v2 is a scalar in disguise, return a diagonal matrix rather than
227 // a sparse matrix. 240 // a sparse matrix.
228 { 241 {
236 249
237 // sparse matrix by diagonal matrix ops 250 // sparse matrix by diagonal matrix ops
238 251
239 DEFBINOP (mul_scm_dm, sparse_complex_matrix, diag_matrix) 252 DEFBINOP (mul_scm_dm, sparse_complex_matrix, diag_matrix)
240 { 253 {
241 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&); 254 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&,
255 const octave_diag_matrix&);
242 256
243 if (v1.rows () == 1 && v1.columns () == 1) 257 if (v1.rows () == 1 && v1.columns () == 1)
244 // If v1 is a scalar in disguise, return a diagonal matrix rather than 258 // If v1 is a scalar in disguise, return a diagonal matrix rather than
245 // a sparse matrix. 259 // a sparse matrix.
246 { 260 {
249 return octave_value (d * v2.diag_matrix_value ()); 263 return octave_value (d * v2.diag_matrix_value ());
250 } 264 }
251 else 265 else
252 { 266 {
253 MatrixType typ = v1.matrix_type (); 267 MatrixType typ = v1.matrix_type ();
254 SparseComplexMatrix ret = v1.sparse_complex_matrix_value () * v2.diag_matrix_value (); 268 SparseComplexMatrix ret = v1.sparse_complex_matrix_value () *
269 v2.diag_matrix_value ();
255 octave_value out = octave_value (ret); 270 octave_value out = octave_value (ret);
256 typ.mark_as_unsymmetric (); 271 typ.mark_as_unsymmetric ();
257 out.matrix_type (typ); 272 out.matrix_type (typ);
258 return out; 273 return out;
259 } 274 }
260 } 275 }
261 276
262 DEFBINOP (mul_sm_cdm, sparse_matrix, complex_diag_matrix) 277 DEFBINOP (mul_sm_cdm, sparse_matrix, complex_diag_matrix)
263 { 278 {
264 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&); 279 CAST_BINOP_ARGS (const octave_sparse_matrix&,
280 const octave_complex_diag_matrix&);
265 281
266 if (v1.rows () == 1 && v1.columns () == 1) 282 if (v1.rows () == 1 && v1.columns () == 1)
267 // If v1 is a scalar in disguise, return a diagonal matrix rather than 283 // If v1 is a scalar in disguise, return a diagonal matrix rather than
268 // a sparse matrix. 284 // a sparse matrix.
269 { 285 {
272 return octave_value (d * v2.complex_diag_matrix_value ()); 288 return octave_value (d * v2.complex_diag_matrix_value ());
273 } 289 }
274 else 290 else
275 { 291 {
276 MatrixType typ = v1.matrix_type (); 292 MatrixType typ = v1.matrix_type ();
277 SparseComplexMatrix ret = v1.sparse_matrix_value () * v2.complex_diag_matrix_value (); 293 SparseComplexMatrix ret = v1.sparse_matrix_value () *
294 v2.complex_diag_matrix_value ();
278 octave_value out = octave_value (ret); 295 octave_value out = octave_value (ret);
279 typ.mark_as_unsymmetric (); 296 typ.mark_as_unsymmetric ();
280 out.matrix_type (typ); 297 out.matrix_type (typ);
281 return out; 298 return out;
282 } 299 }
283 } 300 }
284 301
285 DEFBINOP (mul_scm_cdm, sparse_complex_matrix, complex_diag_matrix) 302 DEFBINOP (mul_scm_cdm, sparse_complex_matrix, complex_diag_matrix)
286 { 303 {
287 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&); 304 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&,
305 const octave_complex_diag_matrix&);
288 306
289 if (v1.rows () == 1 && v1.columns () == 1) 307 if (v1.rows () == 1 && v1.columns () == 1)
290 // If v1 is a scalar in disguise, return a diagonal matrix rather than 308 // If v1 is a scalar in disguise, return a diagonal matrix rather than
291 // a sparse matrix. 309 // a sparse matrix.
292 { 310 {
302 return octave_value (v1.sparse_complex_matrix_value () * d); 320 return octave_value (v1.sparse_complex_matrix_value () * d);
303 } 321 }
304 else 322 else
305 { 323 {
306 MatrixType typ = v1.matrix_type (); 324 MatrixType typ = v1.matrix_type ();
307 SparseComplexMatrix ret = v1.sparse_complex_matrix_value () * v2.complex_diag_matrix_value (); 325 SparseComplexMatrix ret = v1.sparse_complex_matrix_value () *
326 v2.complex_diag_matrix_value ();
308 octave_value out = octave_value (ret); 327 octave_value out = octave_value (ret);
309 typ.mark_as_unsymmetric (); 328 typ.mark_as_unsymmetric ();
310 out.matrix_type (typ); 329 out.matrix_type (typ);
311 return out; 330 return out;
312 } 331 }
313 } 332 }
314 333
315 DEFBINOP (div_scm_dm, sparse_complex_matrix, diag_matrix) 334 DEFBINOP (div_scm_dm, sparse_complex_matrix, diag_matrix)
316 { 335 {
317 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&); 336 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&,
337 const octave_diag_matrix&);
318 338
319 if (v2.rows () == 1 && v2.columns () == 1) 339 if (v2.rows () == 1 && v2.columns () == 1)
320 { 340 {
321 double d = v2.scalar_value (); 341 double d = v2.scalar_value ();
322 342
326 return octave_value (v1.sparse_complex_matrix_value () / d); 346 return octave_value (v1.sparse_complex_matrix_value () / d);
327 } 347 }
328 else 348 else
329 { 349 {
330 MatrixType typ = v2.matrix_type (); 350 MatrixType typ = v2.matrix_type ();
331 return xdiv (v1.sparse_complex_matrix_value (), v2.diag_matrix_value (), typ); 351 return xdiv (v1.sparse_complex_matrix_value (),
352 v2.diag_matrix_value (), typ);
332 } 353 }
333 } 354 }
334 355
335 DEFBINOP (div_sm_cdm, sparse_matrix, complex_diag_matrix) 356 DEFBINOP (div_sm_cdm, sparse_matrix, complex_diag_matrix)
336 { 357 {
337 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&); 358 CAST_BINOP_ARGS (const octave_sparse_matrix&,
359 const octave_complex_diag_matrix&);
338 360
339 if (v2.rows () == 1 && v2.columns () == 1) 361 if (v2.rows () == 1 && v2.columns () == 1)
340 { 362 {
341 std::complex<double> d = v2.complex_value (); 363 std::complex<double> d = v2.complex_value ();
342 364
346 return octave_value (v1.sparse_matrix_value () / d); 368 return octave_value (v1.sparse_matrix_value () / d);
347 } 369 }
348 else 370 else
349 { 371 {
350 MatrixType typ = v2.matrix_type (); 372 MatrixType typ = v2.matrix_type ();
351 return xdiv (v1.sparse_matrix_value (), v2.complex_diag_matrix_value (), typ); 373 return xdiv (v1.sparse_matrix_value (),
374 v2.complex_diag_matrix_value (), typ);
352 } 375 }
353 } 376 }
354 377
355 DEFBINOP (div_scm_cdm, sparse_complex_matrix, complex_diag_matrix) 378 DEFBINOP (div_scm_cdm, sparse_complex_matrix, complex_diag_matrix)
356 { 379 {
357 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&); 380 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&,
381 const octave_complex_diag_matrix&);
358 382
359 if (v2.rows () == 1 && v2.columns () == 1) 383 if (v2.rows () == 1 && v2.columns () == 1)
360 { 384 {
361 std::complex<double> d = v2.complex_value (); 385 std::complex<double> d = v2.complex_value ();
362 386
366 return octave_value (v1.sparse_complex_matrix_value () / d); 390 return octave_value (v1.sparse_complex_matrix_value () / d);
367 } 391 }
368 else 392 else
369 { 393 {
370 MatrixType typ = v2.matrix_type (); 394 MatrixType typ = v2.matrix_type ();
371 return xdiv (v1.sparse_complex_matrix_value (), v2.complex_diag_matrix_value (), typ); 395 return xdiv (v1.sparse_complex_matrix_value (),
396 v2.complex_diag_matrix_value (), typ);
372 } 397 }
373 } 398 }
374 399
375 DEFBINOP (add_sm_cdm, sparse_matrix, complex_diag_matrix) 400 DEFBINOP (add_sm_cdm, sparse_matrix, complex_diag_matrix)
376 { 401 {
377 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&); 402 CAST_BINOP_ARGS (const octave_sparse_matrix&,
403 const octave_complex_diag_matrix&);
378 404
379 if (v2.rows () == 1 && v2.columns () == 1) 405 if (v2.rows () == 1 && v2.columns () == 1)
380 // If v2 is a scalar in disguise, return a diagonal matrix rather than 406 // If v2 is a scalar in disguise, return a diagonal matrix rather than
381 // a sparse matrix. 407 // a sparse matrix.
382 { 408 {
388 return v1.sparse_matrix_value () + v2.complex_diag_matrix_value (); 414 return v1.sparse_matrix_value () + v2.complex_diag_matrix_value ();
389 } 415 }
390 416
391 DEFBINOP (add_scm_dm, sparse_complex_matrix, diag_matrix) 417 DEFBINOP (add_scm_dm, sparse_complex_matrix, diag_matrix)
392 { 418 {
393 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&); 419 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&,
420 const octave_diag_matrix&);
394 421
395 if (v2.rows () == 1 && v2.columns () == 1) 422 if (v2.rows () == 1 && v2.columns () == 1)
396 // If v2 is a scalar in disguise, return a diagonal matrix rather than 423 // If v2 is a scalar in disguise, return a diagonal matrix rather than
397 // a sparse matrix. 424 // a sparse matrix.
398 { 425 {
404 return v1.sparse_complex_matrix_value () + v2.diag_matrix_value (); 431 return v1.sparse_complex_matrix_value () + v2.diag_matrix_value ();
405 } 432 }
406 433
407 DEFBINOP (add_scm_cdm, sparse_complex_matrix, complex_diag_matrix) 434 DEFBINOP (add_scm_cdm, sparse_complex_matrix, complex_diag_matrix)
408 { 435 {
409 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&); 436 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&,
437 const octave_complex_diag_matrix&);
410 438
411 if (v2.rows () == 1 && v2.columns () == 1) 439 if (v2.rows () == 1 && v2.columns () == 1)
412 // If v2 is a scalar in disguise, return a diagonal matrix rather than 440 // If v2 is a scalar in disguise, return a diagonal matrix rather than
413 // a sparse matrix. 441 // a sparse matrix.
414 { 442 {
420 return v1.sparse_complex_matrix_value () + v2.complex_diag_matrix_value (); 448 return v1.sparse_complex_matrix_value () + v2.complex_diag_matrix_value ();
421 } 449 }
422 450
423 DEFBINOP (sub_sm_cdm, sparse_matrix, complex_diag_matrix) 451 DEFBINOP (sub_sm_cdm, sparse_matrix, complex_diag_matrix)
424 { 452 {
425 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&); 453 CAST_BINOP_ARGS (const octave_sparse_matrix&,
454 const octave_complex_diag_matrix&);
426 455
427 if (v2.rows () == 1 && v2.columns () == 1) 456 if (v2.rows () == 1 && v2.columns () == 1)
428 // If v2 is a scalar in disguise, return a diagonal matrix rather than 457 // If v2 is a scalar in disguise, return a diagonal matrix rather than
429 // a sparse matrix. 458 // a sparse matrix.
430 { 459 {
436 return v1.sparse_matrix_value () - v2.complex_diag_matrix_value (); 465 return v1.sparse_matrix_value () - v2.complex_diag_matrix_value ();
437 } 466 }
438 467
439 DEFBINOP (sub_scm_dm, sparse_complex_matrix, diag_matrix) 468 DEFBINOP (sub_scm_dm, sparse_complex_matrix, diag_matrix)
440 { 469 {
441 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&); 470 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&,
471 const octave_diag_matrix&);
442 472
443 if (v2.rows () == 1 && v2.columns () == 1) 473 if (v2.rows () == 1 && v2.columns () == 1)
444 // If v2 is a scalar in disguise, return a diagonal matrix rather than 474 // If v2 is a scalar in disguise, return a diagonal matrix rather than
445 // a sparse matrix. 475 // a sparse matrix.
446 { 476 {
452 return v1.sparse_complex_matrix_value () - v2.diag_matrix_value (); 482 return v1.sparse_complex_matrix_value () - v2.diag_matrix_value ();
453 } 483 }
454 484
455 DEFBINOP (sub_scm_cdm, sparse_complex_matrix, complex_diag_matrix) 485 DEFBINOP (sub_scm_cdm, sparse_complex_matrix, complex_diag_matrix)
456 { 486 {
457 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&); 487 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&,
488 const octave_complex_diag_matrix&);
458 489
459 if (v2.rows () == 1 && v2.columns () == 1) 490 if (v2.rows () == 1 && v2.columns () == 1)
460 // If v2 is a scalar in disguise, return a diagonal matrix rather than 491 // If v2 is a scalar in disguise, return a diagonal matrix rather than
461 // a sparse matrix. 492 // a sparse matrix.
462 { 493 {
473 { 504 {
474 INSTALL_BINOP (op_mul, octave_diag_matrix, octave_sparse_complex_matrix, 505 INSTALL_BINOP (op_mul, octave_diag_matrix, octave_sparse_complex_matrix,
475 mul_dm_scm); 506 mul_dm_scm);
476 INSTALL_BINOP (op_mul, octave_complex_diag_matrix, octave_sparse_matrix, 507 INSTALL_BINOP (op_mul, octave_complex_diag_matrix, octave_sparse_matrix,
477 mul_cdm_sm); 508 mul_cdm_sm);
478 INSTALL_BINOP (op_mul, octave_complex_diag_matrix, octave_sparse_complex_matrix, 509 INSTALL_BINOP (op_mul, octave_complex_diag_matrix,
479 mul_cdm_scm); 510 octave_sparse_complex_matrix, mul_cdm_scm);
480 INSTALL_BINOP (op_ldiv, octave_diag_matrix, octave_sparse_complex_matrix, ldiv_dm_scm); 511 INSTALL_BINOP (op_ldiv, octave_diag_matrix, octave_sparse_complex_matrix,
481 INSTALL_BINOP (op_ldiv, octave_complex_diag_matrix, octave_sparse_matrix, ldiv_cdm_sm); 512 ldiv_dm_scm);
482 INSTALL_BINOP (op_ldiv, octave_complex_diag_matrix, octave_sparse_complex_matrix, 513 INSTALL_BINOP (op_ldiv, octave_complex_diag_matrix, octave_sparse_matrix,
483 ldiv_cdm_scm); 514 ldiv_cdm_sm);
484 515 INSTALL_BINOP (op_ldiv, octave_complex_diag_matrix,
485 INSTALL_BINOP (op_add, octave_diag_matrix, octave_sparse_complex_matrix, add_dm_scm); 516 octave_sparse_complex_matrix, ldiv_cdm_scm);
486 INSTALL_BINOP (op_add, octave_complex_diag_matrix, octave_sparse_matrix, add_cdm_sm); 517
487 INSTALL_BINOP (op_add, octave_complex_diag_matrix, octave_sparse_complex_matrix, 518 INSTALL_BINOP (op_add, octave_diag_matrix, octave_sparse_complex_matrix,
488 add_cdm_scm); 519 add_dm_scm);
489 INSTALL_BINOP (op_sub, octave_diag_matrix, octave_sparse_complex_matrix, sub_dm_scm); 520 INSTALL_BINOP (op_add, octave_complex_diag_matrix, octave_sparse_matrix,
490 INSTALL_BINOP (op_sub, octave_complex_diag_matrix, octave_sparse_matrix, sub_cdm_sm); 521 add_cdm_sm);
491 INSTALL_BINOP (op_sub, octave_complex_diag_matrix, octave_sparse_complex_matrix, 522 INSTALL_BINOP (op_add, octave_complex_diag_matrix,
492 sub_cdm_scm); 523 octave_sparse_complex_matrix, add_cdm_scm);
524 INSTALL_BINOP (op_sub, octave_diag_matrix, octave_sparse_complex_matrix,
525 sub_dm_scm);
526 INSTALL_BINOP (op_sub, octave_complex_diag_matrix, octave_sparse_matrix,
527 sub_cdm_sm);
528 INSTALL_BINOP (op_sub, octave_complex_diag_matrix,
529 octave_sparse_complex_matrix, sub_cdm_scm);
493 530
494 INSTALL_BINOP (op_mul, octave_sparse_complex_matrix, octave_diag_matrix, 531 INSTALL_BINOP (op_mul, octave_sparse_complex_matrix, octave_diag_matrix,
495 mul_scm_dm); 532 mul_scm_dm);
496 INSTALL_BINOP (op_mul, octave_sparse_matrix, octave_complex_diag_matrix, 533 INSTALL_BINOP (op_mul, octave_sparse_matrix, octave_complex_diag_matrix,
497 mul_sm_cdm); 534 mul_sm_cdm);
498 INSTALL_BINOP (op_mul, octave_sparse_complex_matrix, octave_complex_diag_matrix, 535 INSTALL_BINOP (op_mul, octave_sparse_complex_matrix,
499 mul_scm_cdm); 536 octave_complex_diag_matrix, mul_scm_cdm);
500 537
501 INSTALL_BINOP (op_div, octave_sparse_complex_matrix, octave_diag_matrix, div_scm_dm); 538 INSTALL_BINOP (op_div, octave_sparse_complex_matrix, octave_diag_matrix,
502 INSTALL_BINOP (op_div, octave_sparse_matrix, octave_complex_diag_matrix, div_sm_cdm); 539 div_scm_dm);
503 INSTALL_BINOP (op_div, octave_sparse_complex_matrix, octave_complex_diag_matrix, div_scm_cdm); 540 INSTALL_BINOP (op_div, octave_sparse_matrix, octave_complex_diag_matrix,
504 541 div_sm_cdm);
505 INSTALL_BINOP (op_add, octave_sparse_complex_matrix, octave_diag_matrix, add_scm_dm); 542 INSTALL_BINOP (op_div, octave_sparse_complex_matrix,
506 INSTALL_BINOP (op_add, octave_sparse_matrix, octave_complex_diag_matrix, add_sm_cdm); 543 octave_complex_diag_matrix, div_scm_cdm);
507 INSTALL_BINOP (op_add, octave_sparse_complex_matrix, octave_complex_diag_matrix, add_scm_cdm); 544
508 INSTALL_BINOP (op_sub, octave_sparse_complex_matrix, octave_diag_matrix, sub_scm_dm); 545 INSTALL_BINOP (op_add, octave_sparse_complex_matrix, octave_diag_matrix,
509 INSTALL_BINOP (op_sub, octave_sparse_matrix, octave_complex_diag_matrix, sub_sm_cdm); 546 add_scm_dm);
510 INSTALL_BINOP (op_sub, octave_sparse_complex_matrix, octave_complex_diag_matrix, sub_scm_cdm); 547 INSTALL_BINOP (op_add, octave_sparse_matrix, octave_complex_diag_matrix,
511 } 548 add_sm_cdm);
549 INSTALL_BINOP (op_add, octave_sparse_complex_matrix,
550 octave_complex_diag_matrix, add_scm_cdm);
551 INSTALL_BINOP (op_sub, octave_sparse_complex_matrix, octave_diag_matrix,
552 sub_scm_dm);
553 INSTALL_BINOP (op_sub, octave_sparse_matrix, octave_complex_diag_matrix,
554 sub_sm_cdm);
555 INSTALL_BINOP (op_sub, octave_sparse_complex_matrix,
556 octave_complex_diag_matrix, sub_scm_cdm);
557 }