comparison liboctave/operators/Sparse-op-defs.h @ 19007:9ac2357f19bc

doc: Replace "non-zero" with "nonzero" to match existing usage. Replace all occurrences in both documentation and code comments. * doc/interpreter/contrib.txi, doc/interpreter/diagperm.txi, doc/interpreter/external.txi, doc/interpreter/sparse.txi, doc/interpreter/stmt.txi, doc/interpreter/testfun.txi, doc/refcard/refcard.tex, examples/mysparse.c, libinterp/corefcn/balance.cc, libinterp/corefcn/cellfun.cc, libinterp/corefcn/data.cc, libinterp/corefcn/filter.cc, libinterp/corefcn/find.cc, libinterp/corefcn/kron.cc, libinterp/corefcn/ls-mat5.cc, libinterp/corefcn/luinc.cc, libinterp/corefcn/mappers.cc, libinterp/corefcn/oct-fstrm.cc, libinterp/corefcn/oct-fstrm.h, libinterp/corefcn/oct-iostrm.cc, libinterp/corefcn/oct-iostrm.h, libinterp/corefcn/oct-stdstrm.h, libinterp/corefcn/oct-strstrm.h, libinterp/corefcn/spparms.cc, libinterp/corefcn/toplev.cc, libinterp/corefcn/utils.cc, libinterp/dldfcn/symrcm.cc, libinterp/octave-value/ov-bool-mat.cc, liboctave/array/CSparse.cc, liboctave/array/Sparse.cc, liboctave/array/Sparse.h, liboctave/array/dSparse.cc, liboctave/numeric/randmtzig.c, liboctave/operators/Sparse-op-defs.h, scripts/help/get_first_help_sentence.m, scripts/miscellaneous/edit.m, scripts/plot/draw/pie.m, scripts/plot/draw/pie3.m, scripts/sparse/colperm.m, scripts/sparse/nonzeros.m, scripts/sparse/spdiags.m, scripts/sparse/spfun.m, scripts/sparse/spones.m, scripts/sparse/sprand.m, scripts/sparse/sprandn.m, scripts/sparse/sprandsym.m, scripts/sparse/spstats.m, scripts/sparse/svds.m, scripts/special-matrix/gallery.m, scripts/statistics/base/moment.m, scripts/statistics/tests/cor_test.m: Replace "non-zero" with "nonzero" to match existing usage.
author Rik <rik@octave.org>
date Sun, 08 Jun 2014 17:59:59 -0700
parents 6113e0c6920b
children 65554f5847ac
comparison
equal deleted inserted replaced
19006:c53e11fab75f 19007:9ac2357f19bc
1182 r = SparseBoolMatrix (F (m1, m2.elem (0,0))); \ 1182 r = SparseBoolMatrix (F (m1, m2.elem (0,0))); \
1183 else if (m1_nr == m2_nr && m1_nc == m2_nc) \ 1183 else if (m1_nr == m2_nr && m1_nc == m2_nc) \
1184 { \ 1184 { \
1185 if (m1_nr != 0 || m1_nc != 0) \ 1185 if (m1_nr != 0 || m1_nc != 0) \
1186 { \ 1186 { \
1187 /* Count num of non-zero elements */ \ 1187 /* Count num of nonzero elements */ \
1188 octave_idx_type nel = 0; \ 1188 octave_idx_type nel = 0; \
1189 for (octave_idx_type j = 0; j < m1_nc; j++) \ 1189 for (octave_idx_type j = 0; j < m1_nc; j++) \
1190 for (octave_idx_type i = 0; i < m1_nr; i++) \ 1190 for (octave_idx_type i = 0; i < m1_nr; i++) \
1191 if (C1 (m1.elem (i, j)) OP C2 (m2.elem (i, j))) \ 1191 if (C1 (m1.elem (i, j)) OP C2 (m2.elem (i, j))) \
1192 nel++; \ 1192 nel++; \
1250 r = SparseBoolMatrix (F (m1, m2.elem (0,0))); \ 1250 r = SparseBoolMatrix (F (m1, m2.elem (0,0))); \
1251 else if (m1_nr == m2_nr && m1_nc == m2_nc) \ 1251 else if (m1_nr == m2_nr && m1_nc == m2_nc) \
1252 { \ 1252 { \
1253 if (m1_nr != 0 || m1_nc != 0) \ 1253 if (m1_nr != 0 || m1_nc != 0) \
1254 { \ 1254 { \
1255 /* Count num of non-zero elements */ \ 1255 /* Count num of nonzero elements */ \
1256 octave_idx_type nel = 0; \ 1256 octave_idx_type nel = 0; \
1257 for (octave_idx_type j = 0; j < m1_nc; j++) \ 1257 for (octave_idx_type j = 0; j < m1_nc; j++) \
1258 for (octave_idx_type i = 0; i < m1_nr; i++) \ 1258 for (octave_idx_type i = 0; i < m1_nr; i++) \
1259 if ((m1.elem (i, j) != LHS_ZERO) \ 1259 if ((m1.elem (i, j) != LHS_ZERO) \
1260 OP (m2.elem (i, j) != RHS_ZERO)) \ 1260 OP (m2.elem (i, j) != RHS_ZERO)) \
1422 r = SparseBoolMatrix (F (m1.elem (0,0), m2)); \ 1422 r = SparseBoolMatrix (F (m1.elem (0,0), m2)); \
1423 else if (m1_nr == m2_nr && m1_nc == m2_nc) \ 1423 else if (m1_nr == m2_nr && m1_nc == m2_nc) \
1424 { \ 1424 { \
1425 if (m1_nr != 0 || m1_nc != 0) \ 1425 if (m1_nr != 0 || m1_nc != 0) \
1426 { \ 1426 { \
1427 /* Count num of non-zero elements */ \ 1427 /* Count num of nonzero elements */ \
1428 octave_idx_type nel = 0; \ 1428 octave_idx_type nel = 0; \
1429 for (octave_idx_type j = 0; j < m1_nc; j++) \ 1429 for (octave_idx_type j = 0; j < m1_nc; j++) \
1430 for (octave_idx_type i = 0; i < m1_nr; i++) \ 1430 for (octave_idx_type i = 0; i < m1_nr; i++) \
1431 if (C1 (m1.elem (i, j)) OP C2 (m2.elem (i, j))) \ 1431 if (C1 (m1.elem (i, j)) OP C2 (m2.elem (i, j))) \
1432 nel++; \ 1432 nel++; \
1490 r = SparseBoolMatrix (F (m1.elem (0,0), m2)); \ 1490 r = SparseBoolMatrix (F (m1.elem (0,0), m2)); \
1491 else if (m1_nr == m2_nr && m1_nc == m2_nc) \ 1491 else if (m1_nr == m2_nr && m1_nc == m2_nc) \
1492 { \ 1492 { \
1493 if (m1_nr != 0 || m1_nc != 0) \ 1493 if (m1_nr != 0 || m1_nc != 0) \
1494 { \ 1494 { \
1495 /* Count num of non-zero elements */ \ 1495 /* Count num of nonzero elements */ \
1496 octave_idx_type nel = 0; \ 1496 octave_idx_type nel = 0; \
1497 for (octave_idx_type j = 0; j < m1_nc; j++) \ 1497 for (octave_idx_type j = 0; j < m1_nc; j++) \
1498 for (octave_idx_type i = 0; i < m1_nr; i++) \ 1498 for (octave_idx_type i = 0; i < m1_nr; i++) \
1499 if ((m1.elem (i, j) != LHS_ZERO) \ 1499 if ((m1.elem (i, j) != LHS_ZERO) \
1500 OP (m2.elem (i, j) != RHS_ZERO)) \ 1500 OP (m2.elem (i, j) != RHS_ZERO)) \
1928 OCTAVE_LOCAL_BUFFER (RET_EL_TYPE, Xcol, nr); \ 1928 OCTAVE_LOCAL_BUFFER (RET_EL_TYPE, Xcol, nr); \
1929 \ 1929 \
1930 retval.change_capacity (nel); \ 1930 retval.change_capacity (nel); \
1931 /* The optimal break-point as estimated from simulations */ \ 1931 /* The optimal break-point as estimated from simulations */ \
1932 /* Note that Mergesort is O(nz log(nz)) while searching all */ \ 1932 /* Note that Mergesort is O(nz log(nz)) while searching all */ \
1933 /* values is O(nr), where nz here is non-zero per row of */ \ 1933 /* values is O(nr), where nz here is nonzero per row of */ \
1934 /* length nr. The test itself was then derived from the */ \ 1934 /* length nr. The test itself was then derived from the */ \
1935 /* simulation with random square matrices and the observation */ \ 1935 /* simulation with random square matrices and the observation */ \
1936 /* of the number of non-zero elements in the output matrix */ \ 1936 /* of the number of nonzero elements in the output matrix */ \
1937 /* it was found that the breakpoints were */ \ 1937 /* it was found that the breakpoints were */ \
1938 /* nr: 500 1000 2000 5000 10000 */ \ 1938 /* nr: 500 1000 2000 5000 10000 */ \
1939 /* nz: 6 25 97 585 2202 */ \ 1939 /* nz: 6 25 97 585 2202 */ \
1940 /* The below is a simplication of the 'polyfit'-ed parameters */ \ 1940 /* The below is a simplication of the 'polyfit'-ed parameters */ \
1941 /* to these breakpoints */ \ 1941 /* to these breakpoints */ \