comparison src/OPERATORS/op-m-sm.cc @ 9931:fb6b6fcafa62

untabify files in src/OPERATORS directory
author John W. Eaton <jwe@octave.org>
date Mon, 07 Dec 2009 14:49:48 -0500
parents eb63fbe60fab
children ac4b97c6bf8b
comparison
equal deleted inserted replaced
9930:1ddc25c3623a 9931:fb6b6fcafa62
1 /* 1 /*
2 2
3 Copyright (C) 2004, 2005, 2006, 2007, 2008 David Bateman 3 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 David Bateman
4 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Andy Adler 4 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Andy Adler
5 5
6 This file is part of Octave. 6 This file is part of Octave.
7 7
8 Octave is free software; you can redistribute it and/or modify it 8 Octave is free software; you can redistribute it and/or modify it
53 if (v2.rows() == 1 && v2.columns() == 1) 53 if (v2.rows() == 1 && v2.columns() == 1)
54 { 54 {
55 double d = v2.scalar_value (); 55 double d = v2.scalar_value ();
56 56
57 if (d == 0.0) 57 if (d == 0.0)
58 gripe_divide_by_zero (); 58 gripe_divide_by_zero ();
59 59
60 return octave_value (v1.array_value () / d); 60 return octave_value (v1.array_value () / d);
61 } 61 }
62 else 62 else
63 { 63 {
102 DEFBINOP (el_pow, matrix, sparse_matrix) 102 DEFBINOP (el_pow, matrix, sparse_matrix)
103 { 103 {
104 CAST_BINOP_ARGS (const octave_matrix&, const octave_sparse_matrix&); 104 CAST_BINOP_ARGS (const octave_matrix&, const octave_sparse_matrix&);
105 105
106 return octave_value (elem_xpow (SparseMatrix (v1.matrix_value ()), 106 return octave_value (elem_xpow (SparseMatrix (v1.matrix_value ()),
107 v2.sparse_matrix_value ())); 107 v2.sparse_matrix_value ()));
108 } 108 }
109 109
110 DEFBINOP (el_ldiv, matrix, sparse_matrix) 110 DEFBINOP (el_ldiv, matrix, sparse_matrix)
111 { 111 {
112 CAST_BINOP_ARGS (const octave_matrix&, const octave_sparse_matrix&); 112 CAST_BINOP_ARGS (const octave_matrix&, const octave_sparse_matrix&);
161 161
162 INSTALL_ASSIGNOP (op_asn_eq, octave_matrix, octave_sparse_matrix, assign) 162 INSTALL_ASSIGNOP (op_asn_eq, octave_matrix, octave_sparse_matrix, assign)
163 INSTALL_ASSIGNCONV (octave_matrix, octave_sparse_matrix, octave_matrix) 163 INSTALL_ASSIGNCONV (octave_matrix, octave_sparse_matrix, octave_matrix)
164 164
165 INSTALL_WIDENOP (octave_matrix, octave_sparse_matrix, 165 INSTALL_WIDENOP (octave_matrix, octave_sparse_matrix,
166 sparse_matrix_conv); 166 sparse_matrix_conv);
167 } 167 }
168 168
169 /* 169 /*
170 ;;; Local Variables: *** 170 ;;; Local Variables: ***
171 ;;; mode: C++ *** 171 ;;; mode: C++ ***