Mercurial > hg > octave-jordi
comparison scripts/general/private/__isequal__.m @ 20954:77f5591878bf
maint: Use '! expr' rather than '!expr' to conform to coding guidelines.
* dialog.h, documentation-dock-widget.cc, files-dock-widget.cc,
find-files-dialog.cc, file-editor-tab.cc, file-editor.cc, find-dialog.cc,
octave-qscintilla.cc, main-window.cc, parser.cc, resource-manager.cc,
workspace-view.cc, data.cc, dlmread.cc, gl-render.cc, gl2ps-renderer.cc,
graphics.cc, graphics.in.h, ls-hdf5.cc, ls-mat5.cc, ls-oct-binary.cc, lsode.cc,
mappers.cc, pt-jit.cc, regexp.cc, spparms.cc, symtab.h, utils.cc, zfstream.cc,
__eigs__.cc, __glpk__.cc, __init_fltk__.cc, ccolamd.cc, colamd.cc,
ov-base-diag.cc, ov-base-int.cc, ov-base-sparse.cc, ov-bool-mat.cc,
ov-bool-sparse.cc, ov-bool.cc, ov-class.cc, ov-cx-sparse.cc, ov-fcn-handle.cc,
ov-fcn-inline.cc, ov-java.cc, ov-perm.cc, ov-re-sparse.cc, ov-str-mat.cc,
ov-struct.cc, ov.cc, pt-mat.cc, Array.cc, Array.h, CMatrix.cc, CSparse.cc,
MatrixType.cc, PermMatrix.cc, Sparse.h, dMatrix.cc, dSparse.cc, fCMatrix.cc,
fMatrix.cc, idx-vector.cc, CollocWt.h, SparseCmplxLU.cc, SparseCmplxQR.cc,
SparseQR.cc, SparsedbleLU.cc, base-qr.cc, eigs-base.cc, oct-fftw.cc,
randmtzig.c, sparse-dmsolve.cc, kpse.cc, lo-regexp.cc, oct-locbuf.h,
url-transfer.cc, url-transfer.h, bitset.m, interp2.m, __isequal__.m,
inpolygon.m, questdlg.m, help.m, compare_versions.m, substruct.m,
configure_make.m, whitebg.m, __marching_cube__.m, struct2hdl.m, polyfit.m,
spline.m, unique.m, svds.m, ellipke.m, binoinv.m, hygepdf.m, nbininv.m,
poissinv.m, tcdf.m, unidcdf.m, unidpdf.m, dec2base.m, assert.m, weekday.m,
mkoctfile.in.cc:
maint: Use '! expr' rather than '!expr' to conform to coding guidelines.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 20 Dec 2015 10:15:02 -0800 |
parents | 40e1134ec984 |
children |
comparison
equal
deleted
inserted
replaced
20953:6982def1d416 | 20954:77f5591878bf |
---|---|
71 ## Test that everything is the same size since the dimensionality matches. | 71 ## Test that everything is the same size since the dimensionality matches. |
72 nd = ndims (x); | 72 nd = ndims (x); |
73 k = 1; | 73 k = 1; |
74 do | 74 do |
75 t = all (builtin ("size", x, k) == cellfun ("size", varargin, k)); | 75 t = all (builtin ("size", x, k) == cellfun ("size", varargin, k)); |
76 until (!t || k++ == nd); | 76 until (! t || k++ == nd); |
77 endif | 77 endif |
78 | 78 |
79 ## From here on, compare objects as if they were structures. | 79 ## From here on, compare objects as if they were structures. |
80 if (t && isobject (x)) | 80 if (t && isobject (x)) |
81 ## Locally suppress class-to-struct warning. We know what we are doing. | 81 ## Locally suppress class-to-struct warning. We know what we are doing. |
153 for argn = 1:l_v | 153 for argn = 1:l_v |
154 y = varargin{argn}; | 154 y = varargin{argn}; |
155 f_y = find (y); | 155 f_y = find (y); |
156 | 156 |
157 t = (l_f_x == length (f_y)) && all (f_x == f_y); | 157 t = (l_f_x == length (f_y)) && all (f_x == f_y); |
158 if (!t) | 158 if (! t) |
159 break; | 159 break; |
160 endif | 160 endif |
161 | 161 |
162 y = y(f_y); | 162 y = y(f_y); |
163 m = (x == y); | 163 m = (x == y); |
164 t = all (m); | 164 t = all (m); |
165 | 165 |
166 if (!t && nans_compare_equal) | 166 if (! t && nans_compare_equal) |
167 t = isnan (x(!m)) && isnan (y(!m)); | 167 t = isnan (x(! m)) && isnan (y(! m)); |
168 endif | 168 endif |
169 | 169 |
170 if (!t) | 170 if (! t) |
171 break; | 171 break; |
172 endif | 172 endif |
173 endfor | 173 endfor |
174 | 174 |
175 endif | 175 endif |