comparison src/OPERATORS/op-dm-scm.cc @ 14846:460a3c6d8bf1

maint: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists. Example: func() => func () * dynamic.txi, func.txi, oop.txi, var.txi, embedded.cc, fortdemo.cc, funcdemo.cc, paramdemo.cc, stringdemo.cc, unwinddemo.cc, Array.cc, Array.h, CColVector.cc, CDiagMatrix.h, CMatrix.cc, CNDArray.cc, CRowVector.cc, CSparse.cc, CmplxGEPBAL.cc, EIG.cc, MSparse.cc, MatrixType.cc, Sparse-op-defs.h, Sparse-perm-op-defs.h, Sparse.cc, Sparse.h, SparseCmplxCHOL.cc, SparseCmplxCHOL.h, SparseCmplxLU.cc, SparseCmplxQR.cc, SparseCmplxQR.h, SparseQR.cc, SparseQR.h, SparsedbleCHOL.cc, SparsedbleCHOL.h, SparsedbleLU.cc, SparsedbleLU.h, base-lu.cc, cmd-hist.cc, dColVector.cc, dDiagMatrix.h, dMatrix.cc, dNDArray.cc, dRowVector.cc, dSparse.cc, dbleCHOL.cc, dbleGEPBAL.cc, dim-vector.cc, eigs-base.cc, f2c-main.c, fCColVector.cc, fCDiagMatrix.h, fCMatrix.cc, fCNDArray.cc, fCRowVector.cc, fCmplxGEPBAL.cc, fColVector.cc, fDiagMatrix.h, fEIG.cc, fMatrix.cc, fNDArray.cc, fRowVector.cc, file-ops.cc, file-stat.cc, floatCHOL.cc, floatGEPBAL.cc, idx-vector.h, lo-specfun.cc, lo-sysdep.cc, mx-inlines.cc, oct-binmap.h, oct-convn.cc, oct-md5.cc, oct-mem.h, oct-rand.cc, oct-syscalls.cc, randgamma.c, randmtzig.c, sparse-base-chol.cc, sparse-base-chol.h, sparse-base-lu.cc, sparse-dmsolve.cc, tempname.c, curl.m, divergence.m, randi.m, dlmwrite.m, edit.m, getappdata.m, what.m, getarchdir.m, install.m, installed_packages.m, repackage.m, unload_packages.m, colorbar.m, figure.m, isosurface.m, legend.m, loglog.m, plot.m, plot3.m, plotyy.m, polar.m, __errplot__.m, __ghostscript__.m, __marching_cube__.m, __plt__.m, __scatter__.m, semilogx.m, semilogy.m, trimesh.m, trisurf.m, demo.m, test.m, datetick.m, __delaunayn__.cc, __dsearchn__.cc, __fltk_uigetfile__.cc, __glpk__.cc, __init_fltk__.cc, __lin_interpn__.cc, __magick_read__.cc, __pchip_deriv__.cc, balance.cc, bsxfun.cc, ccolamd.cc, cellfun.cc, chol.cc, daspk.cc, dasrt.cc, dassl.cc, dmperm.cc, eig.cc, eigs.cc, fftw.cc, filter.cc, find.cc, kron.cc, lookup.cc, lsode.cc, matrix_type.cc, md5sum.cc, mgorth.cc, qr.cc, quad.cc, rand.cc, regexp.cc, symbfact.cc, tril.cc, urlwrite.cc, op-bm-bm.cc, op-cdm-cdm.cc, op-cell.cc, op-chm.cc, op-cm-cm.cc, op-cm-scm.cc, op-cm-sm.cc, op-cs-scm.cc, op-cs-sm.cc, op-dm-dm.cc, op-dm-scm.cc, op-dm-sm.cc, op-fcdm-fcdm.cc, op-fcm-fcm.cc, op-fdm-fdm.cc, op-fm-fm.cc, op-int.h, op-m-m.cc, op-m-scm.cc, op-m-sm.cc, op-pm-pm.cc, op-pm-scm.cc, op-pm-sm.cc, op-range.cc, op-s-scm.cc, op-s-sm.cc, op-sbm-sbm.cc, op-scm-cm.cc, op-scm-cs.cc, op-scm-m.cc, op-scm-s.cc, op-scm-scm.cc, op-scm-sm.cc, op-sm-cm.cc, op-sm-cs.cc, op-sm-m.cc, op-sm-s.cc, op-sm-scm.cc, op-sm-sm.cc, op-str-str.cc, op-struct.cc, bitfcns.cc, data.cc, debug.cc, dynamic-ld.cc, error.cc, gl-render.cc, graphics.cc, graphics.in.h, load-path.cc, ls-hdf5.cc, ls-mat5.cc, ls-mat5.h, ls-oct-ascii.cc, ls-oct-ascii.h, mex.cc, mk-errno-list, oct-map.cc, oct-obj.h, oct-parse.yy, octave-config.in.cc, ov-base-int.cc, ov-base-mat.cc, ov-base.cc, ov-bool-mat.cc, ov-bool-sparse.cc, ov-bool.cc, ov-cell.cc, ov-class.cc, ov-class.h, ov-cx-mat.cc, ov-cx-sparse.cc, ov-fcn-handle.cc, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-intx.h, ov-range.h, ov-re-mat.cc, ov-re-sparse.cc, ov-str-mat.cc, ov-struct.cc, ov-usr-fcn.h, ov.h, pr-output.cc, pt-id.cc, pt-id.h, pt-mat.cc, pt-select.cc, sparse.cc, symtab.cc, symtab.h, syscalls.cc, toplev.cc, txt-eng-ft.cc, variables.cc, zfstream.cc, zfstream.h, Dork.m, getStash.m, myStash.m, Gork.m, Pork.m, myStash.m, getStash.m, myStash.m, getStash.m, myStash.m, fntests.m: Use Octave coding convention for cuddled parenthis in function calls with empty argument lists.
author Rik <octave@nomad.inbox5.com>
date Sun, 08 Jul 2012 11:28:50 -0700
parents 72c96de7a403
children
comparison
equal deleted inserted replaced
14844:5bc9b9cb4362 14846:460a3c6d8bf1
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&, const octave_sparse_complex_matrix&);
45 45
46 if (v2.rows() == 1 && v2.columns() == 1) 46 if (v2.rows () == 1 && v2.columns () == 1)
47 // If v2 is a scalar in disguise, return a diagonal matrix rather than 47 // If v2 is a scalar in disguise, return a diagonal matrix rather than
48 // a sparse matrix. 48 // a sparse matrix.
49 { 49 {
50 std::complex<double> d = v2.complex_value (); 50 std::complex<double> d = v2.complex_value ();
51 51
64 64
65 DEFBINOP (mul_cdm_sm, complex_diag_matrix, sparse_matrix) 65 DEFBINOP (mul_cdm_sm, complex_diag_matrix, sparse_matrix)
66 { 66 {
67 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_matrix&); 67 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_matrix&);
68 68
69 if (v2.rows() == 1 && v2.columns() == 1) 69 if (v2.rows () == 1 && v2.columns () == 1)
70 // If v2 is a scalar in disguise, return a diagonal matrix rather than 70 // If v2 is a scalar in disguise, return a diagonal matrix rather than
71 // a sparse matrix. 71 // a sparse matrix.
72 { 72 {
73 std::complex<double> d = v2.scalar_value (); 73 std::complex<double> d = v2.scalar_value ();
74 74
87 87
88 DEFBINOP (mul_cdm_scm, complex_diag_matrix, sparse_complex_matrix) 88 DEFBINOP (mul_cdm_scm, complex_diag_matrix, sparse_complex_matrix)
89 { 89 {
90 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_complex_matrix&); 90 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_complex_matrix&);
91 91
92 if (v2.rows() == 1 && v2.columns() == 1) 92 if (v2.rows () == 1 && v2.columns () == 1)
93 // If v2 is a scalar in disguise, return a diagonal matrix rather than 93 // If v2 is a scalar in disguise, return a diagonal matrix rather than
94 // a sparse matrix. 94 // a sparse matrix.
95 { 95 {
96 std::complex<double> d = v2.complex_value (); 96 std::complex<double> d = v2.complex_value ();
97 97
140 140
141 DEFBINOP (add_dm_scm, diag_matrix, sparse_complex_matrix) 141 DEFBINOP (add_dm_scm, diag_matrix, sparse_complex_matrix)
142 { 142 {
143 CAST_BINOP_ARGS (const octave_diag_matrix&, const octave_sparse_complex_matrix&); 143 CAST_BINOP_ARGS (const octave_diag_matrix&, const octave_sparse_complex_matrix&);
144 144
145 if (v2.rows() == 1 && v2.columns() == 1) 145 if (v2.rows () == 1 && v2.columns () == 1)
146 // If v2 is a scalar in disguise, return a diagonal matrix rather than 146 // If v2 is a scalar in disguise, return a diagonal matrix rather than
147 // a sparse matrix. 147 // a sparse matrix.
148 { 148 {
149 std::complex<double> d = v2.complex_value (); 149 std::complex<double> d = v2.complex_value ();
150 150
156 156
157 DEFBINOP (add_cdm_sm, complex_diag_matrix, sparse_matrix) 157 DEFBINOP (add_cdm_sm, complex_diag_matrix, sparse_matrix)
158 { 158 {
159 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_matrix&); 159 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_matrix&);
160 160
161 if (v2.rows() == 1 && v2.columns() == 1) 161 if (v2.rows () == 1 && v2.columns () == 1)
162 // If v2 is a scalar in disguise, return a diagonal matrix rather than 162 // If v2 is a scalar in disguise, return a diagonal matrix rather than
163 // a sparse matrix. 163 // a sparse matrix.
164 { 164 {
165 double d = v2.scalar_value (); 165 double d = v2.scalar_value ();
166 166
172 172
173 DEFBINOP (add_cdm_scm, complex_diag_matrix, sparse_complex_matrix) 173 DEFBINOP (add_cdm_scm, complex_diag_matrix, sparse_complex_matrix)
174 { 174 {
175 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_complex_matrix&); 175 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_complex_matrix&);
176 176
177 if (v2.rows() == 1 && v2.columns() == 1) 177 if (v2.rows () == 1 && v2.columns () == 1)
178 // If v2 is a scalar in disguise, return a diagonal matrix rather than 178 // If v2 is a scalar in disguise, return a diagonal matrix rather than
179 // a sparse matrix. 179 // a sparse matrix.
180 { 180 {
181 std::complex<double> d = v2.complex_value (); 181 std::complex<double> d = v2.complex_value ();
182 182
188 188
189 DEFBINOP (sub_dm_scm, diag_matrix, sparse_complex_matrix) 189 DEFBINOP (sub_dm_scm, diag_matrix, sparse_complex_matrix)
190 { 190 {
191 CAST_BINOP_ARGS (const octave_diag_matrix&, const octave_sparse_complex_matrix&); 191 CAST_BINOP_ARGS (const octave_diag_matrix&, const octave_sparse_complex_matrix&);
192 192
193 if (v2.rows() == 1 && v2.columns() == 1) 193 if (v2.rows () == 1 && v2.columns () == 1)
194 // If v2 is a scalar in disguise, return a diagonal matrix rather than 194 // If v2 is a scalar in disguise, return a diagonal matrix rather than
195 // a sparse matrix. 195 // a sparse matrix.
196 { 196 {
197 std::complex<double> d = v2.complex_value (); 197 std::complex<double> d = v2.complex_value ();
198 198
204 204
205 DEFBINOP (sub_cdm_sm, complex_diag_matrix, sparse_matrix) 205 DEFBINOP (sub_cdm_sm, complex_diag_matrix, sparse_matrix)
206 { 206 {
207 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_matrix&); 207 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_matrix&);
208 208
209 if (v2.rows() == 1 && v2.columns() == 1) 209 if (v2.rows () == 1 && v2.columns () == 1)
210 // If v2 is a scalar in disguise, return a diagonal matrix rather than 210 // If v2 is a scalar in disguise, return a diagonal matrix rather than
211 // a sparse matrix. 211 // a sparse matrix.
212 { 212 {
213 double d = v2.scalar_value (); 213 double d = v2.scalar_value ();
214 214
220 220
221 DEFBINOP (sub_cdm_scm, complex_diag_matrix, sparse_complex_matrix) 221 DEFBINOP (sub_cdm_scm, complex_diag_matrix, sparse_complex_matrix)
222 { 222 {
223 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_complex_matrix&); 223 CAST_BINOP_ARGS (const octave_complex_diag_matrix&, const octave_sparse_complex_matrix&);
224 224
225 if (v2.rows() == 1 && v2.columns() == 1) 225 if (v2.rows () == 1 && v2.columns () == 1)
226 // If v2 is a scalar in disguise, return a diagonal matrix rather than 226 // If v2 is a scalar in disguise, return a diagonal matrix rather than
227 // a sparse matrix. 227 // a sparse matrix.
228 { 228 {
229 std::complex<double> d = v2.complex_value (); 229 std::complex<double> d = v2.complex_value ();
230 230
238 238
239 DEFBINOP (mul_scm_dm, sparse_complex_matrix, diag_matrix) 239 DEFBINOP (mul_scm_dm, sparse_complex_matrix, diag_matrix)
240 { 240 {
241 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&); 241 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&);
242 242
243 if (v1.rows() == 1 && v1.columns() == 1) 243 if (v1.rows () == 1 && v1.columns () == 1)
244 // If v1 is a scalar in disguise, return a diagonal matrix rather than 244 // If v1 is a scalar in disguise, return a diagonal matrix rather than
245 // a sparse matrix. 245 // a sparse matrix.
246 { 246 {
247 std::complex<double> d = v1.complex_value (); 247 std::complex<double> d = v1.complex_value ();
248 248
261 261
262 DEFBINOP (mul_sm_cdm, sparse_matrix, complex_diag_matrix) 262 DEFBINOP (mul_sm_cdm, sparse_matrix, complex_diag_matrix)
263 { 263 {
264 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&); 264 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&);
265 265
266 if (v1.rows() == 1 && v1.columns() == 1) 266 if (v1.rows () == 1 && v1.columns () == 1)
267 // If v1 is a scalar in disguise, return a diagonal matrix rather than 267 // If v1 is a scalar in disguise, return a diagonal matrix rather than
268 // a sparse matrix. 268 // a sparse matrix.
269 { 269 {
270 std::complex<double> d = v1.complex_value (); 270 std::complex<double> d = v1.complex_value ();
271 271
284 284
285 DEFBINOP (mul_scm_cdm, sparse_complex_matrix, complex_diag_matrix) 285 DEFBINOP (mul_scm_cdm, sparse_complex_matrix, complex_diag_matrix)
286 { 286 {
287 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&); 287 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&);
288 288
289 if (v1.rows() == 1 && v1.columns() == 1) 289 if (v1.rows () == 1 && v1.columns () == 1)
290 // If v1 is a scalar in disguise, return a diagonal matrix rather than 290 // If v1 is a scalar in disguise, return a diagonal matrix rather than
291 // a sparse matrix. 291 // a sparse matrix.
292 { 292 {
293 std::complex<double> d = v1.complex_value (); 293 std::complex<double> d = v1.complex_value ();
294 294
295 return octave_value (d * v2.complex_diag_matrix_value ()); 295 return octave_value (d * v2.complex_diag_matrix_value ());
296 } 296 }
297 else if (v2.rows() == 1 && v2.columns() == 1) 297 else if (v2.rows () == 1 && v2.columns () == 1)
298 // If v2 is a scalar in disguise, don't bother with further dispatching. 298 // If v2 is a scalar in disguise, don't bother with further dispatching.
299 { 299 {
300 std::complex<double> d = v2.complex_value (); 300 std::complex<double> d = v2.complex_value ();
301 301
302 return octave_value (v1.sparse_complex_matrix_value () * d); 302 return octave_value (v1.sparse_complex_matrix_value () * d);
314 314
315 DEFBINOP (div_scm_dm, sparse_complex_matrix, diag_matrix) 315 DEFBINOP (div_scm_dm, sparse_complex_matrix, diag_matrix)
316 { 316 {
317 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&); 317 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&);
318 318
319 if (v2.rows() == 1 && v2.columns() == 1) 319 if (v2.rows () == 1 && v2.columns () == 1)
320 { 320 {
321 double d = v2.scalar_value (); 321 double d = v2.scalar_value ();
322 322
323 if (d == 0.0) 323 if (d == 0.0)
324 gripe_divide_by_zero (); 324 gripe_divide_by_zero ();
334 334
335 DEFBINOP (div_sm_cdm, sparse_matrix, complex_diag_matrix) 335 DEFBINOP (div_sm_cdm, sparse_matrix, complex_diag_matrix)
336 { 336 {
337 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&); 337 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&);
338 338
339 if (v2.rows() == 1 && v2.columns() == 1) 339 if (v2.rows () == 1 && v2.columns () == 1)
340 { 340 {
341 std::complex<double> d = v2.complex_value (); 341 std::complex<double> d = v2.complex_value ();
342 342
343 if (d == 0.0) 343 if (d == 0.0)
344 gripe_divide_by_zero (); 344 gripe_divide_by_zero ();
354 354
355 DEFBINOP (div_scm_cdm, sparse_complex_matrix, complex_diag_matrix) 355 DEFBINOP (div_scm_cdm, sparse_complex_matrix, complex_diag_matrix)
356 { 356 {
357 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&); 357 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&);
358 358
359 if (v2.rows() == 1 && v2.columns() == 1) 359 if (v2.rows () == 1 && v2.columns () == 1)
360 { 360 {
361 std::complex<double> d = v2.complex_value (); 361 std::complex<double> d = v2.complex_value ();
362 362
363 if (d == 0.0) 363 if (d == 0.0)
364 gripe_divide_by_zero (); 364 gripe_divide_by_zero ();
374 374
375 DEFBINOP (add_sm_cdm, sparse_matrix, complex_diag_matrix) 375 DEFBINOP (add_sm_cdm, sparse_matrix, complex_diag_matrix)
376 { 376 {
377 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&); 377 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&);
378 378
379 if (v2.rows() == 1 && v2.columns() == 1) 379 if (v2.rows () == 1 && v2.columns () == 1)
380 // If v2 is a scalar in disguise, return a diagonal matrix rather than 380 // If v2 is a scalar in disguise, return a diagonal matrix rather than
381 // a sparse matrix. 381 // a sparse matrix.
382 { 382 {
383 std::complex<double> d = v2.complex_value (); 383 std::complex<double> d = v2.complex_value ();
384 384
390 390
391 DEFBINOP (add_scm_dm, sparse_complex_matrix, diag_matrix) 391 DEFBINOP (add_scm_dm, sparse_complex_matrix, diag_matrix)
392 { 392 {
393 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&); 393 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&);
394 394
395 if (v2.rows() == 1 && v2.columns() == 1) 395 if (v2.rows () == 1 && v2.columns () == 1)
396 // If v2 is a scalar in disguise, return a diagonal matrix rather than 396 // If v2 is a scalar in disguise, return a diagonal matrix rather than
397 // a sparse matrix. 397 // a sparse matrix.
398 { 398 {
399 double d = v2.scalar_value (); 399 double d = v2.scalar_value ();
400 400
406 406
407 DEFBINOP (add_scm_cdm, sparse_complex_matrix, complex_diag_matrix) 407 DEFBINOP (add_scm_cdm, sparse_complex_matrix, complex_diag_matrix)
408 { 408 {
409 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&); 409 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&);
410 410
411 if (v2.rows() == 1 && v2.columns() == 1) 411 if (v2.rows () == 1 && v2.columns () == 1)
412 // If v2 is a scalar in disguise, return a diagonal matrix rather than 412 // If v2 is a scalar in disguise, return a diagonal matrix rather than
413 // a sparse matrix. 413 // a sparse matrix.
414 { 414 {
415 std::complex<double> d = v2.complex_value (); 415 std::complex<double> d = v2.complex_value ();
416 416
422 422
423 DEFBINOP (sub_sm_cdm, sparse_matrix, complex_diag_matrix) 423 DEFBINOP (sub_sm_cdm, sparse_matrix, complex_diag_matrix)
424 { 424 {
425 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&); 425 CAST_BINOP_ARGS (const octave_sparse_matrix&, const octave_complex_diag_matrix&);
426 426
427 if (v2.rows() == 1 && v2.columns() == 1) 427 if (v2.rows () == 1 && v2.columns () == 1)
428 // If v2 is a scalar in disguise, return a diagonal matrix rather than 428 // If v2 is a scalar in disguise, return a diagonal matrix rather than
429 // a sparse matrix. 429 // a sparse matrix.
430 { 430 {
431 std::complex<double> d = v2.complex_value (); 431 std::complex<double> d = v2.complex_value ();
432 432
438 438
439 DEFBINOP (sub_scm_dm, sparse_complex_matrix, diag_matrix) 439 DEFBINOP (sub_scm_dm, sparse_complex_matrix, diag_matrix)
440 { 440 {
441 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&); 441 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_diag_matrix&);
442 442
443 if (v2.rows() == 1 && v2.columns() == 1) 443 if (v2.rows () == 1 && v2.columns () == 1)
444 // If v2 is a scalar in disguise, return a diagonal matrix rather than 444 // If v2 is a scalar in disguise, return a diagonal matrix rather than
445 // a sparse matrix. 445 // a sparse matrix.
446 { 446 {
447 double d = v2.scalar_value (); 447 double d = v2.scalar_value ();
448 448
454 454
455 DEFBINOP (sub_scm_cdm, sparse_complex_matrix, complex_diag_matrix) 455 DEFBINOP (sub_scm_cdm, sparse_complex_matrix, complex_diag_matrix)
456 { 456 {
457 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&); 457 CAST_BINOP_ARGS (const octave_sparse_complex_matrix&, const octave_complex_diag_matrix&);
458 458
459 if (v2.rows() == 1 && v2.columns() == 1) 459 if (v2.rows () == 1 && v2.columns () == 1)
460 // If v2 is a scalar in disguise, return a diagonal matrix rather than 460 // If v2 is a scalar in disguise, return a diagonal matrix rather than
461 // a sparse matrix. 461 // a sparse matrix.
462 { 462 {
463 std::complex<double> d = v2.complex_value (); 463 std::complex<double> d = v2.complex_value ();
464 464