Mercurial > octave-libtiff
changeset 23581:c3075ae020e1
maint: Deprecate is_complex_type and replace with iscomplex.
* ov.h (is_complex_type): Use OCTAVE_DEPRECATED macro around function.
* ov.h (iscomplex): New function.
* __ichol__.cc, __ilu__.cc, balance.cc, bsxfun.cc, cellfun.cc, conv2.cc,
daspk.cc, dasrt.cc, dassl.cc, data.cc, det.cc, dot.cc, fft.cc, fft2.cc,
fftn.cc, filter.cc, find.cc, givens.cc, graphics.cc, gsvd.cc, hess.cc,
hex2num.cc, inv.cc, kron.cc, lookup.cc, ls-mat-ascii.cc, ls-mat4.cc,
ls-mat5.cc, lsode.cc, lu.cc, matrix_type.cc, mex.cc, mgorth.cc, ordschur.cc,
pinv.cc, psi.cc, quad.cc, qz.cc, rcond.cc, schur.cc, sparse-xpow.cc, sparse.cc,
sqrtm.cc, svd.cc, sylvester.cc, symtab.cc, typecast.cc, variables.cc, xnorm.cc,
__eigs__.cc, amd.cc, ccolamd.cc, chol.cc, colamd.cc, qr.cc, symbfact.cc,
ov-base.h, ov-complex.h, ov-cx-diag.h, ov-cx-mat.h, ov-cx-sparse.h,
ov-flt-complex.h, ov-flt-cx-diag.h, ov-flt-cx-mat.h, jit-typeinfo.cc,
pt-tm-const.cc: Replace instances of is_complex_type with iscomplex.
line wrap: on
line diff
--- a/libinterp/corefcn/__ichol__.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/__ichol__.cc Mon Jun 12 21:18:23 2017 -0700 @@ -195,7 +195,7 @@ // In ICHOL0 algorithm the zero-pattern of the input matrix is preserved // so its structure does not change during the algorithm. The same input // matrix is used to build the output matrix due to that fact. - if (! args(0).is_complex_type ()) + if (! args(0).iscomplex ()) { SparseMatrix sm = Ftril (args(0))(0).sparse_matrix_value (); ichol_0 <SparseMatrix, double, ichol_mult_real, @@ -422,7 +422,7 @@ double droptol = args(1).double_value (); std::string michol = args(2).string_value (); - if (! args(0).is_complex_type ()) + if (! args(0).iscomplex ()) { SparseMatrix L; SparseMatrix sm_l = Ftril (args(0))(0).sparse_matrix_value ();
--- a/libinterp/corefcn/__ilu__.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/__ilu__.cc Mon Jun 12 21:18:23 2017 -0700 @@ -153,7 +153,7 @@ // its structure does not change during the algorithm. The same input // matrix is used to build the output matrix due to that fact. octave_value_list arg_list; - if (! args(0).is_complex_type ()) + if (! args(0).iscomplex ()) { SparseMatrix sm = args(0).sparse_matrix_value (); SparseMatrix speye (DiagMatrix (sm.cols (), sm.cols (), 1.0)); @@ -472,7 +472,7 @@ double droptol = args(1).double_value (); std::string milu = args(2).string_value (); - if (! args(0).is_complex_type ()) + if (! args(0).iscomplex ()) { SparseMatrix sm = args(0).sparse_matrix_value (); SparseMatrix sm_u = Ftriu (ovl (sm))(0).sparse_matrix_value (); @@ -913,7 +913,7 @@ octave_value_list arg_list; octave_idx_type nnz_u, nnz_l; - if (! args(0).is_complex_type ()) + if (! args(0).iscomplex ()) { SparseMatrix sm = args(0).sparse_matrix_value (); SparseMatrix U, L;
--- a/libinterp/corefcn/balance.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/balance.cc Mon Jun 12 21:18:23 2017 -0700 @@ -108,8 +108,8 @@ bool isfloat = args(0).is_single_type () || (! AEPcase && args(1).is_single_type ()); - bool complex_case = args(0).is_complex_type () - || (! AEPcase && args(1).is_complex_type ()); + bool complex_case = args(0).iscomplex () + || (! AEPcase && args(1).iscomplex ()); // Extract argument 1 parameter for both AEP and GEP. Matrix aa;
--- a/libinterp/corefcn/bsxfun.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/bsxfun.cc Mon Jun 12 21:18:23 2017 -0700 @@ -546,7 +546,7 @@ } else if (tmp(0).is_double_type ()) { - if (tmp(0).is_complex_type () + if (tmp(0).iscomplex () && have_FloatNDArray) { result_ComplexNDArray =
--- a/libinterp/corefcn/cellfun.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/cellfun.cc Mon Jun 12 21:18:23 2017 -0700 @@ -1807,7 +1807,7 @@ else if (array.is_uint64_type ()) retval = do_num2cell (array.uint64_array_value (), dimv); } - else if (array.is_complex_type ()) + else if (array.iscomplex ()) { if (array.is_single_type ()) retval = do_num2cell (array.float_complex_array_value (), dimv); @@ -2304,7 +2304,7 @@ retcell = do_cellslices_nda (x.uint64_array_value (), lb, ub, dim); } - else if (x.is_complex_type ()) + else if (x.iscomplex ()) { if (x.is_single_type ()) retcell = do_cellslices_nda (x.float_complex_array_value (),
--- a/libinterp/corefcn/conv2.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/conv2.cc Mon Jun 12 21:18:23 2017 -0700 @@ -110,8 +110,8 @@ if (args(0).is_single_type () || args(1).is_single_type () || args(2).is_single_type ()) { - if (args(0).is_complex_type () || args(1).is_complex_type () - || args(2).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex () + || args(2).iscomplex ()) { FloatComplexMatrix a (args(2).float_complex_matrix_value ()); if (args(1).is_real_type () && args(2).is_real_type ()) @@ -137,8 +137,8 @@ } else { - if (args(0).is_complex_type () || args(1).is_complex_type () - || args(2).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex () + || args(2).iscomplex ()) { ComplexMatrix a (args(2).complex_matrix_value ()); if (args(1).is_real_type () && args(2).is_real_type ()) @@ -167,7 +167,7 @@ { if (args(0).is_single_type () || args(1).is_single_type ()) { - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) { FloatComplexMatrix a (args(0).float_complex_matrix_value ()); if (args(1).is_real_type ()) @@ -190,7 +190,7 @@ } else { - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) { ComplexMatrix a (args(0).complex_matrix_value ()); if (args(1).is_real_type ()) @@ -332,7 +332,7 @@ if (args(0).is_single_type () || args(1).is_single_type ()) { - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) { FloatComplexNDArray a (args(0).float_complex_array_value ()); if (args(1).is_real_type ()) @@ -355,7 +355,7 @@ } else { - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) { ComplexNDArray a (args(0).complex_array_value ()); if (args(1).is_real_type ())
--- a/libinterp/corefcn/daspk.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/daspk.cc Mon Jun 12 21:18:23 2017 -0700 @@ -89,7 +89,7 @@ if (tlen == 0 || ! tmp(0).is_defined ()) err_user_supplied_eval ("daspk"); - if (! warned_fcn_imaginary && tmp(0).is_complex_type ()) + if (! warned_fcn_imaginary && tmp(0).iscomplex ()) { warning ("daspk: ignoring imaginary part returned from user-supplied function"); warned_fcn_imaginary = true; @@ -139,7 +139,7 @@ if (tlen == 0 || ! tmp(0).is_defined ()) err_user_supplied_eval ("daspk"); - if (! warned_jac_imaginary && tmp(0).is_complex_type ()) + if (! warned_jac_imaginary && tmp(0).iscomplex ()) { warning ("daspk: ignoring imaginary part returned from user-supplied jacobian function"); warned_jac_imaginary = true;
--- a/libinterp/corefcn/dasrt.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/dasrt.cc Mon Jun 12 21:18:23 2017 -0700 @@ -87,7 +87,7 @@ if (tmp.empty () || ! tmp(0).is_defined ()) err_user_supplied_eval ("dasrt"); - if (! warned_fcn_imaginary && tmp(0).is_complex_type ()) + if (! warned_fcn_imaginary && tmp(0).iscomplex ()) { warning ("dasrt: ignoring imaginary part returned from user-supplied function"); warned_fcn_imaginary = true; @@ -128,7 +128,7 @@ if (tmp.empty () || ! tmp(0).is_defined ()) err_user_supplied_eval ("dasrt"); - if (! warned_cf_imaginary && tmp(0).is_complex_type ()) + if (! warned_cf_imaginary && tmp(0).iscomplex ()) { warning ("dasrt: ignoring imaginary part returned from user-supplied constraint function"); warned_cf_imaginary = true; @@ -175,7 +175,7 @@ if (tlen == 0 || ! tmp(0).is_defined ()) err_user_supplied_eval ("dasrt"); - if (! warned_jac_imaginary && tmp(0).is_complex_type ()) + if (! warned_jac_imaginary && tmp(0).iscomplex ()) { warning ("dasrt: ignoring imaginary part returned from user-supplied jacobian function"); warned_jac_imaginary = true;
--- a/libinterp/corefcn/dassl.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/dassl.cc Mon Jun 12 21:18:23 2017 -0700 @@ -89,7 +89,7 @@ if (tlen == 0 || ! tmp(0).is_defined ()) err_user_supplied_eval ("dassl"); - if (! warned_fcn_imaginary && tmp(0).is_complex_type ()) + if (! warned_fcn_imaginary && tmp(0).iscomplex ()) { warning ("dassl: ignoring imaginary part returned from user-supplied function"); warned_fcn_imaginary = true; @@ -139,7 +139,7 @@ if (tlen == 0 || ! tmp(0).is_defined ()) err_user_supplied_eval ("dassl"); - if (! warned_jac_imaginary && tmp(0).is_complex_type ()) + if (! warned_jac_imaginary && tmp(0).iscomplex ()) { warning ("dassl: ignoring imaginary part returned from user-supplied jacobian function"); warned_jac_imaginary = true;
--- a/libinterp/corefcn/data.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/data.cc Mon Jun 12 21:18:23 2017 -0700 @@ -226,7 +226,7 @@ if (! args(1).is_numeric_type ()) err_wrong_type_arg ("atan2", args(1)); - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) error ("atan2: not defined for complex numbers"); if (args(0).is_single_type () || args(1).is_single_type ()) @@ -334,9 +334,9 @@ if (! arg1.is_numeric_type ()) err_wrong_type_arg ("hypot", arg1); - if (arg0.is_complex_type ()) + if (arg0.iscomplex ()) arg0 = arg0.abs (); - if (arg1.is_complex_type ()) + if (arg1.iscomplex ()) arg1 = arg1.abs (); if (arg0.is_single_type () || arg1.is_single_type ()) @@ -508,7 +508,7 @@ map_2_xlog2 (x, f, e); retval = ovl (f, e); } - else if (args(0).is_complex_type ()) + else if (args(0).iscomplex ()) { FloatComplexNDArray f; FloatComplexNDArray x = args(0).float_complex_array_value (); @@ -527,7 +527,7 @@ map_2_xlog2 (x, f, e); retval = ovl (f, e); } - else if (args(0).is_complex_type ()) + else if (args(0).iscomplex ()) { ComplexNDArray f; ComplexNDArray x = args(0).complex_array_value (); @@ -608,7 +608,7 @@ if (! args(1).is_numeric_type ()) err_wrong_type_arg ("rem", args(1)); - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) error ("rem: not defined for complex numbers"); if (args(0).isinteger () || args(1).isinteger ()) @@ -787,7 +787,7 @@ if (! args(1).is_numeric_type ()) err_wrong_type_arg ("mod", args(1)); - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) error ("mod: not defined for complex numbers"); if (args(0).isinteger () || args(1).isinteger ()) @@ -947,7 +947,7 @@ retval = tmp.FCN (dim); \ } \ } \ - else if (arg.is_complex_type ()) \ + else if (arg.iscomplex ()) \ { \ if (arg.is_sparse_type ()) \ { \ @@ -1800,7 +1800,7 @@ all_dq_strings_p = false; if (all_real_p && ! args(i).is_real_type ()) all_real_p = false; - if (all_cmplx_p && ! (args(i).is_complex_type () + if (all_cmplx_p && ! (args(i).iscomplex () || args(i).is_real_type ())) all_cmplx_p = false; if (! any_sparse_p && args(i).is_sparse_type ()) @@ -3195,7 +3195,7 @@ if (args.length () != 1) print_usage (); - return ovl (args(0).is_complex_type ()); + return ovl (args(0).iscomplex ()); } DEFUN (isfloat, args, , @@ -3251,7 +3251,7 @@ { octave_value arg = args(0); - if (arg.is_complex_type ()) + if (arg.iscomplex ()) retval = arg; else { @@ -5133,14 +5133,14 @@ if (arg_1.is_single_type () || arg_2.is_single_type ()) { - if (arg_1.is_complex_type () || arg_2.is_complex_type ()) + if (arg_1.iscomplex () || arg_2.iscomplex ()) retval = do_linspace<FloatComplexMatrix> (arg_1, arg_2, npoints); else retval = do_linspace<FloatMatrix> (arg_1, arg_2, npoints); } else { - if (arg_1.is_complex_type () || arg_2.is_complex_type ()) + if (arg_1.iscomplex () || arg_2.iscomplex ()) retval = do_linspace<ComplexMatrix> (arg_1, arg_2, npoints); else retval = do_linspace<Matrix> (arg_1, arg_2, npoints); @@ -6987,7 +6987,7 @@ if (vals.is_single_type ()) { - if (vals.is_complex_type ()) + if (vals.iscomplex ()) retval = do_accumarray_sum (idx, vals.float_complex_array_value (), n); @@ -6996,7 +6996,7 @@ } else if (vals.is_numeric_type () || vals.islogical ()) { - if (vals.is_complex_type ()) + if (vals.iscomplex ()) retval = do_accumarray_sum (idx, vals.complex_array_value (), n); @@ -7207,7 +7207,7 @@ if (vals.is_single_type ()) { - if (vals.is_complex_type ()) + if (vals.iscomplex ()) retval = do_accumdim_sum (idx, vals.float_complex_array_value (), dim, n); @@ -7217,7 +7217,7 @@ } else if (vals.is_numeric_type () || vals.islogical ()) { - if (vals.is_complex_type ()) + if (vals.iscomplex ()) retval = do_accumdim_sum (idx, vals.complex_array_value (), dim, n); else @@ -7349,7 +7349,7 @@ if (tval.is_double_type () && fval.is_double_type ()) { - if (tval.is_complex_type () || fval.is_complex_type ()) + if (tval.iscomplex () || fval.iscomplex ()) retval = do_merge (mask, tval.complex_array_value (), fval.complex_array_value ()); @@ -7360,7 +7360,7 @@ } else if (tval.is_single_type () && fval.is_single_type ()) { - if (tval.is_complex_type () || fval.is_complex_type ()) + if (tval.iscomplex () || fval.iscomplex ()) retval = do_merge (mask, tval.float_complex_array_value (), fval.float_complex_array_value ()); @@ -7506,7 +7506,7 @@ } else if (array.is_sparse_type ()) { - if (array.is_complex_type ()) + if (array.iscomplex ()) retval = do_sparse_diff (array.sparse_complex_matrix_value (), order, dim); else @@ -7514,14 +7514,14 @@ } else if (array.is_single_type ()) { - if (array.is_complex_type ()) + if (array.iscomplex ()) retval = array.float_complex_array_value ().diff (order, dim); else retval = array.float_array_value ().diff (order, dim); } else { - if (array.is_complex_type ()) + if (array.iscomplex ()) retval = array.complex_array_value ().diff (order, dim); else retval = array.array_value ().diff (order, dim); @@ -7738,7 +7738,7 @@ if (! args(0).is_numeric_type ()) error ("base64_encode: encoding is supported only for numeric arrays"); - if (args(0).is_complex_type () || args(0).is_sparse_type ()) + if (args(0).iscomplex () || args(0).is_sparse_type ()) error ("base64_encode: encoding complex or sparse data is not supported"); octave_value_list retval;
--- a/libinterp/corefcn/det.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/det.cc Mon Jun 12 21:18:23 2017 -0700 @@ -84,7 +84,7 @@ if (nargout <= 1) retval.resize (1); - if (arg.is_complex_type ()) + if (arg.iscomplex ()) { if (isfloat) { @@ -144,7 +144,7 @@ if (rep) rep->matrix_type (mtype); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { octave_idx_type info; float rcond = 0.0; @@ -189,7 +189,7 @@ rep->matrix_type (mtype); } } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { octave_idx_type info; double rcond = 0.0;
--- a/libinterp/corefcn/dot.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/dot.cc Mon Jun 12 21:18:23 2017 -0700 @@ -122,7 +122,7 @@ F77_INT m, n, k; dim_vector dimz; - if (argx.is_complex_type () || argy.is_complex_type ()) + if (argx.iscomplex () || argy.iscomplex ()) { if (argx.is_single_type () || argy.is_single_type ()) { @@ -280,7 +280,7 @@ error ("blkmm: A and B dimensions don't match: (%s) and (%s)", dimx.str ().c_str (), dimy.str ().c_str ()); - if (argx.is_complex_type () || argy.is_complex_type ()) + if (argx.iscomplex () || argy.iscomplex ()) { if (argx.is_single_type () || argy.is_single_type ()) {
--- a/libinterp/corefcn/fft.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/fft.cc Mon Jun 12 21:18:23 2017 -0700 @@ -146,7 +146,7 @@ nda.resize (dims, 0.0); retval = (type != 0 ? nda.ifourier (dim) : nda.fourier (dim)); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexNDArray cnda = arg.complex_array_value ();
--- a/libinterp/corefcn/fft2.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/fft2.cc Mon Jun 12 21:18:23 2017 -0700 @@ -125,7 +125,7 @@ nda.resize (dims, 0.0); retval = (type != 0 ? nda.ifourier2d () : nda.fourier2d ()); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexNDArray cnda = arg.complex_array_value ();
--- a/libinterp/corefcn/fftn.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/fftn.cc Mon Jun 12 21:18:23 2017 -0700 @@ -111,7 +111,7 @@ nda.resize (dims, 0.0); retval = (type != 0 ? nda.ifourierNd () : nda.fourierNd ()); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexNDArray cnda = arg.complex_array_value ();
--- a/libinterp/corefcn/filter.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/filter.cc Mon Jun 12 21:18:23 2017 -0700 @@ -357,10 +357,10 @@ || args(2).is_single_type () || (nargin >= 4 && args(3).is_single_type ())); - if (args(0).is_complex_type () - || args(1).is_complex_type () - || args(2).is_complex_type () - || (nargin >= 4 && args(3).is_complex_type ())) + if (args(0).iscomplex () + || args(1).iscomplex () + || args(2).iscomplex () + || (nargin >= 4 && args(3).iscomplex ())) { if (isfloat) {
--- a/libinterp/corefcn/find.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/find.cc Mon Jun 12 21:18:23 2017 -0700 @@ -480,7 +480,7 @@ retval = find_nonzero_elem_idx (v, nargout, n_to_find, direction); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { SparseComplexMatrix v = arg.sparse_complex_matrix_value (); @@ -509,7 +509,7 @@ retval = find_nonzero_elem_idx (nda, nargout, n_to_find, direction); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { FloatComplexNDArray cnda = arg.float_complex_array_value (); @@ -522,7 +522,7 @@ retval = find_nonzero_elem_idx (nda, nargout, n_to_find, direction); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexNDArray cnda = arg.complex_array_value ();
--- a/libinterp/corefcn/givens.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/givens.cc Mon Jun 12 21:18:23 2017 -0700 @@ -81,7 +81,7 @@ if (args(0).is_single_type () || args(1).is_single_type ()) { - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) { FloatComplex cx = args(0).float_complex_value (); FloatComplex cy = args(1).float_complex_value (); @@ -122,7 +122,7 @@ } else { - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) { Complex cx = args(0).complex_value (); Complex cy = args(1).complex_value ();
--- a/libinterp/corefcn/graphics.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/graphics.cc Mon Jun 12 21:18:23 2017 -0700 @@ -1418,7 +1418,7 @@ // check if complex is allowed (it's also of class "double", so // checking that alone is not enough to ensure real type) if (type_constraints.find ("real") != type_constraints.end () - && v.is_complex_type ()) + && v.iscomplex ()) xok = false; } else
--- a/libinterp/corefcn/gsvd.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/gsvd.cc Mon Jun 12 21:18:23 2017 -0700 @@ -222,7 +222,7 @@ retval = do_gsvd (tmpA, tmpB, nargout, true); } - else if (argA.is_complex_type () || argB.is_complex_type ()) + else if (argA.iscomplex () || argB.iscomplex ()) { FloatComplexMatrix ctmpA = argA.xfloat_complex_matrix_value ("gsvd: A must be a real or complex matrix"); FloatComplexMatrix ctmpB = argB.xfloat_complex_matrix_value ("gsvd: B must be a real or complex matrix"); @@ -251,7 +251,7 @@ retval = do_gsvd (tmpA, tmpB, nargout); } - else if (argA.is_complex_type () || argB.is_complex_type ()) + else if (argA.iscomplex () || argB.iscomplex ()) { ComplexMatrix ctmpA = argA.xcomplex_matrix_value ("gsvd: A must be a real or complex matrix"); ComplexMatrix ctmpB = argB.xcomplex_matrix_value ("gsvd: B must be a real or complex matrix");
--- a/libinterp/corefcn/hess.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/hess.cc Mon Jun 12 21:18:23 2017 -0700 @@ -87,7 +87,7 @@ retval = ovl (result.unitary_hess_matrix (), result.hess_matrix ()); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { FloatComplexMatrix ctmp = arg.float_complex_matrix_value (); @@ -114,7 +114,7 @@ retval = ovl (result.unitary_hess_matrix (), result.hess_matrix ()); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexMatrix ctmp = arg.complex_matrix_value ();
--- a/libinterp/corefcn/hex2num.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/hex2num.cc Mon Jun 12 21:18:23 2017 -0700 @@ -317,7 +317,7 @@ octave_value val = args(0); - if (val.is_complex_type ()) + if (val.iscomplex ()) error ("num2hex: N must be real"); Cell result;
--- a/libinterp/corefcn/inv.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/inv.cc Mon Jun 12 21:18:23 2017 -0700 @@ -78,7 +78,7 @@ { rcond = 1.0; frcond = 1.0f; - if (arg.is_complex_type ()) + if (arg.iscomplex ()) { if (isfloat) { @@ -125,7 +125,7 @@ result = m.inverse (mattyp, info, frcond, 1); args(0).matrix_type (mattyp); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { FloatComplexMatrix m = arg.float_complex_matrix_value (); @@ -155,7 +155,7 @@ args(0).matrix_type (mattyp); } } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { if (arg.is_sparse_type ()) {
--- a/libinterp/corefcn/kron.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/kron.cc Mon Jun 12 21:18:23 2017 -0700 @@ -168,7 +168,7 @@ retval = do_kron<PermMatrix, PermMatrix> (a, b); else if (a.is_sparse_type () || b.is_sparse_type ()) { - if (a.is_complex_type () || b.is_complex_type ()) + if (a.iscomplex () || b.iscomplex ()) retval = do_kron<SparseComplexMatrix, SparseComplexMatrix> (a, b); else retval = do_kron<SparseMatrix, SparseMatrix> (a, b); @@ -193,18 +193,18 @@ } else if (a.is_single_type () || b.is_single_type ()) { - if (a.is_complex_type ()) + if (a.iscomplex ()) retval = do_kron<FloatComplexDiagMatrix, FloatComplexMatrix> (a, b); - else if (b.is_complex_type ()) + else if (b.iscomplex ()) retval = do_kron<FloatDiagMatrix, FloatComplexMatrix> (a, b); else retval = do_kron<FloatDiagMatrix, FloatMatrix> (a, b); } else { - if (a.is_complex_type ()) + if (a.iscomplex ()) retval = do_kron<ComplexDiagMatrix, ComplexMatrix> (a, b); - else if (b.is_complex_type ()) + else if (b.iscomplex ()) retval = do_kron<DiagMatrix, ComplexMatrix> (a, b); else retval = do_kron<DiagMatrix, Matrix> (a, b); @@ -212,18 +212,18 @@ } else if (a.is_single_type () || b.is_single_type ()) { - if (a.is_complex_type ()) + if (a.iscomplex ()) retval = do_kron<FloatComplexMatrix, FloatComplexMatrix> (a, b); - else if (b.is_complex_type ()) + else if (b.iscomplex ()) retval = do_kron<FloatMatrix, FloatComplexMatrix> (a, b); else retval = do_kron<FloatMatrix, FloatMatrix> (a, b); } else { - if (a.is_complex_type ()) + if (a.iscomplex ()) retval = do_kron<ComplexMatrix, ComplexMatrix> (a, b); - else if (b.is_complex_type ()) + else if (b.iscomplex ()) retval = do_kron<Matrix, ComplexMatrix> (a, b); else retval = do_kron<Matrix, Matrix> (a, b);
--- a/libinterp/corefcn/lookup.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/lookup.cc Mon Jun 12 21:18:23 2017 -0700 @@ -281,10 +281,10 @@ { // In the case of a complex array, absolute values will be used for // compatibility (though it's not too meaningful). - if (table.is_complex_type ()) + if (table.iscomplex ()) table = table.abs (); - if (y.is_complex_type ()) + if (y.iscomplex ()) y = y.abs (); Array<octave_idx_type> idx;
--- a/libinterp/corefcn/ls-mat-ascii.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/ls-mat-ascii.cc Mon Jun 12 21:18:23 2017 -0700 @@ -343,7 +343,7 @@ { bool success = true; - if (val.is_complex_type ()) + if (val.iscomplex ()) warning ("save: omitting imaginary part for ASCII file"); Matrix m;
--- a/libinterp/corefcn/ls-mat4.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/ls-mat4.cc Mon Jun 12 21:18:23 2017 -0700 @@ -414,7 +414,7 @@ uint32_t nnz = len + 1; os.write (reinterpret_cast<char *> (&nnz), 4); - uint32_t iscmplx = (tc.is_complex_type () ? 4 : 3); + uint32_t iscmplx = (tc.iscomplex () ? 4 : 3); os.write (reinterpret_cast<char *> (&iscmplx), 4); uint32_t tmp = 0; @@ -425,7 +425,7 @@ os.write (reinterpret_cast<char *> (&nr), 4); os.write (reinterpret_cast<char *> (&nc), 4); - int32_t imag = (tc.is_complex_type () ? 1 : 0); + int32_t imag = (tc.iscomplex () ? 1 : 0); os.write (reinterpret_cast<char *> (&imag), 4); len = nr * nc;
--- a/libinterp/corefcn/ls-mat5.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/ls-mat5.cc Mon Jun 12 21:18:23 2017 -0700 @@ -2075,7 +2075,7 @@ } else if (tc.is_sparse_type ()) { - if (tc.is_complex_type ()) + if (tc.iscomplex ()) { const SparseComplexMatrix m = tc.sparse_complex_matrix_value (); octave_idx_type nc = m.cols (); @@ -2261,7 +2261,7 @@ octave_idx_type nnz; octave_idx_type nc; - if (tc.is_complex_type ()) + if (tc.iscomplex ()) { SparseComplexMatrix scm = tc.sparse_complex_matrix_value (); nnz = scm.nzmax (); @@ -2450,7 +2450,7 @@ } else if (tc.is_sparse_type ()) { - if (tc.is_complex_type ()) + if (tc.iscomplex ()) { const SparseComplexMatrix m = tc.sparse_complex_matrix_value (); octave_idx_type nnz = m.nnz ();
--- a/libinterp/corefcn/lsode.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/lsode.cc Mon Jun 12 21:18:23 2017 -0700 @@ -85,7 +85,7 @@ if (tmp.empty () || ! tmp(0).is_defined ()) err_user_supplied_eval ("lsode"); - if (! warned_fcn_imaginary && tmp(0).is_complex_type ()) + if (! warned_fcn_imaginary && tmp(0).iscomplex ()) { warning ("lsode: ignoring imaginary part returned from user-supplied function"); warned_fcn_imaginary = true; @@ -125,7 +125,7 @@ if (tmp.empty () || ! tmp(0).is_defined ()) err_user_supplied_eval ("lsode"); - if (! warned_jac_imaginary && tmp(0).is_complex_type ()) + if (! warned_jac_imaginary && tmp(0).iscomplex ()) { warning ("lsode: ignoring imaginary part returned from user-supplied jacobian function"); warned_jac_imaginary = true;
--- a/libinterp/corefcn/lu.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/lu.cc Mon Jun 12 21:18:23 2017 -0700 @@ -255,7 +255,7 @@ retval(4) = fact.R (); } } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { SparseComplexMatrix m = arg.sparse_complex_matrix_value (); @@ -401,7 +401,7 @@ } } } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { if (arg.is_single_type ()) {
--- a/libinterp/corefcn/matrix_type.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/matrix_type.cc Mon Jun 12 21:18:23 2017 -0700 @@ -147,7 +147,7 @@ { MatrixType mattyp; - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { mattyp = args(0).matrix_type (); @@ -287,7 +287,7 @@ error ("matrix_type: Invalid number of arguments"); // Set the matrix type - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) retval = octave_value (args(0).sparse_complex_matrix_value (), mattyp); else @@ -301,7 +301,7 @@ { MatrixType mattyp; - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { mattyp = args(0).matrix_type (); @@ -424,7 +424,7 @@ // Set the matrix type if (args(0).is_single_type ()) { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) retval = octave_value (args(0).float_complex_matrix_value (), mattyp); else @@ -433,7 +433,7 @@ } else { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) retval = octave_value (args(0).complex_matrix_value (), mattyp); else
--- a/libinterp/corefcn/mex.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/mex.cc Mon Jun 12 21:18:23 2017 -0700 @@ -218,7 +218,7 @@ int is_char (void) const { return val.is_string (); } - int is_complex (void) const { return val.is_complex_type (); } + int is_complex (void) const { return val.iscomplex (); } int is_double (void) const { return val.is_double_type (); }
--- a/libinterp/corefcn/mgorth.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/mgorth.cc Mon Jun 12 21:18:23 2017 -0700 @@ -83,7 +83,7 @@ octave_value_list retval; - bool iscomplex = (arg_x.is_complex_type () || arg_v.is_complex_type ()); + bool iscomplex = (arg_x.iscomplex () || arg_v.iscomplex ()); if (arg_x.is_single_type () || arg_v.is_single_type ()) { if (iscomplex)
--- a/libinterp/corefcn/ordschur.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/ordschur.cc Mon Jun 12 21:18:23 2017 -0700 @@ -94,8 +94,8 @@ const bool double_type = args(0).is_double_type () || args(1).is_double_type (); - const bool complex_type = args(0).is_complex_type () - || args(1).is_complex_type (); + const bool complex_type = args(0).iscomplex () + || args(1).iscomplex (); #define PREPARE_ARGS(TYPE, TYPE_M, TYPE_COND) \ TYPE ## Matrix U = args(0).x ## TYPE_M ## _value \
--- a/libinterp/corefcn/pinv.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/pinv.cc Mon Jun 12 21:18:23 2017 -0700 @@ -117,7 +117,7 @@ retval = m.pseudo_inverse (tol); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { FloatComplexMatrix m = arg.float_complex_matrix_value (); @@ -141,7 +141,7 @@ retval = m.pseudo_inverse (tol); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexMatrix m = arg.complex_matrix_value ();
--- a/libinterp/corefcn/psi.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/psi.cc Mon Jun 12 21:18:23 2017 -0700 @@ -96,7 +96,7 @@ retval = psi_z; \ } - if (oct_z.is_complex_type ()) + if (oct_z.iscomplex ()) { FLOAT_BRANCH(double, Complex, complex_, Complex) else FLOAT_BRANCH(single, FloatComplex, float_complex_, FloatComplex)
--- a/libinterp/corefcn/quad.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/quad.cc Mon Jun 12 21:18:23 2017 -0700 @@ -82,7 +82,7 @@ if (! tmp.length () || ! tmp(0).is_defined ()) err_user_supplied_eval ("quad"); - if (! warned_imaginary && tmp(0).is_complex_type ()) + if (! warned_imaginary && tmp(0).iscomplex ()) { warning ("quad: ignoring imaginary part returned from user-supplied function"); warned_imaginary = true; @@ -118,7 +118,7 @@ if (! tmp.length () || ! tmp(0).is_defined ()) err_user_supplied_eval ("quad"); - if (! warned_imaginary && tmp(0).is_complex_type ()) + if (! warned_imaginary && tmp(0).iscomplex ()) { warning ("quad: ignoring imaginary part returned from user-supplied function"); warned_imaginary = true;
--- a/libinterp/corefcn/qz.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/qz.cc Mon Jun 12 21:18:23 2017 -0700 @@ -325,7 +325,7 @@ Matrix aa; ComplexMatrix caa; - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) caa = args(0).complex_matrix_value (); else aa = args(0).matrix_value (); @@ -344,7 +344,7 @@ Matrix bb; ComplexMatrix cbb; - if (args(1).is_complex_type ()) + if (args(1).iscomplex ()) cbb = args(1).complex_matrix_value (); else bb = args(1).matrix_value (); @@ -353,7 +353,7 @@ // declared volatile to avoid compiler warnings about long jumps vforks. volatile bool complex_case - = (args(0).is_complex_type () || args(1).is_complex_type ()); + = (args(0).iscomplex () || args(1).iscomplex ()); if (nargin == 3 && complex_case) error ("qz: cannot re-order complex qz decomposition");
--- a/libinterp/corefcn/rcond.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/rcond.cc Mon Jun 12 21:18:23 2017 -0700 @@ -55,7 +55,7 @@ if (args(0).is_single_type ()) { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { FloatComplexMatrix m = args(0).float_complex_matrix_value (); MatrixType mattyp; @@ -70,7 +70,7 @@ args(0).matrix_type (mattyp); } } - else if (args(0).is_complex_type ()) + else if (args(0).iscomplex ()) { ComplexMatrix m = args(0).complex_matrix_value (); MatrixType mattyp;
--- a/libinterp/corefcn/schur.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/schur.cc Mon Jun 12 21:18:23 2017 -0700 @@ -293,7 +293,7 @@ err_wrong_type_arg ("rsf2csf", args(0)); if (! args(1).is_numeric_type ()) err_wrong_type_arg ("rsf2csf", args(1)); - if (args(0).is_complex_type () || args(1).is_complex_type ()) + if (args(0).iscomplex () || args(1).iscomplex ()) error ("rsf2csf: UR and TR must be real matrices"); if (args(0).is_single_type () || args(1).is_single_type ())
--- a/libinterp/corefcn/sparse-xpow.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/sparse-xpow.cc Mon Jun 12 21:18:23 2017 -0700 @@ -231,7 +231,7 @@ { octave_value val = elem_xpow (a, b); - if (val.is_complex_type ()) + if (val.iscomplex ()) return SparseComplexMatrix (val.complex_matrix_value ()); else return SparseMatrix (val.matrix_value ());
--- a/libinterp/corefcn/sparse.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/sparse.cc Mon Jun 12 21:18:23 2017 -0700 @@ -139,7 +139,7 @@ octave_value arg = args(0); if (arg.islogical ()) retval = arg.sparse_bool_matrix_value (); - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) retval = arg.sparse_complex_matrix_value (); else if (arg.is_numeric_type ()) retval = arg.sparse_matrix_value (); @@ -200,7 +200,7 @@ if (args(2).islogical ()) retval = SparseBoolMatrix (args(2).bool_array_value (), i,j, m, n, summation, nzmax); - else if (args(2).is_complex_type ()) + else if (args(2).iscomplex ()) retval = SparseComplexMatrix (args(2).complex_array_value(), i, j, m, n, summation, nzmax); else if (args(2).is_numeric_type ())
--- a/libinterp/corefcn/sqrtm.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/sqrtm.cc Mon Jun 12 21:18:23 2017 -0700 @@ -94,7 +94,7 @@ MatrixType mt = arg.matrix_type (); - bool iscomplex = arg.is_complex_type (); + bool iscomplex = arg.iscomplex (); typedef typename Matrix::element_type real_type;
--- a/libinterp/corefcn/svd.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/svd.cc Mon Jun 12 21:18:23 2017 -0700 @@ -201,7 +201,7 @@ sigma, result.right_singular_matrix ()); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { FloatComplexMatrix ctmp = arg.float_complex_matrix_value (); @@ -246,7 +246,7 @@ sigma, result.right_singular_matrix ()); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexMatrix ctmp = arg.complex_matrix_value ();
--- a/libinterp/corefcn/sylvester.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/sylvester.cc Mon Jun 12 21:18:23 2017 -0700 @@ -100,9 +100,9 @@ if (isfloat) { - if (arg_a.is_complex_type () - || arg_b.is_complex_type () - || arg_c.is_complex_type ()) + if (arg_a.iscomplex () + || arg_b.iscomplex () + || arg_c.iscomplex ()) { // Do everything in complex arithmetic; @@ -125,9 +125,9 @@ } else { - if (arg_a.is_complex_type () - || arg_b.is_complex_type () - || arg_c.is_complex_type ()) + if (arg_a.iscomplex () + || arg_b.iscomplex () + || arg_c.iscomplex ()) { // Do everything in complex arithmetic;
--- a/libinterp/corefcn/symtab.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/symtab.cc Mon Jun 12 21:18:23 2017 -0700 @@ -1615,7 +1615,7 @@ workspace_element elt (storage, nm, val.class_name (), short_disp_str, dv.str (), - val.is_complex_type ()); + val.iscomplex ()); retval.push_back (elt); }
--- a/libinterp/corefcn/typecast.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/typecast.cc Mon Jun 12 21:18:23 2017 -0700 @@ -185,7 +185,7 @@ else assert (0); } - else if (array.is_complex_type ()) + else if (array.iscomplex ()) { if (array.is_single_type ()) get_data_and_bytesize (array.float_complex_array_value (), data, @@ -518,7 +518,7 @@ else assert (0); } - else if (array.is_complex_type ()) + else if (array.iscomplex ()) { if (array.is_single_type ()) retval = do_bitunpack (array.float_complex_array_value ());
--- a/libinterp/corefcn/variables.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/variables.cc Mon Jun 12 21:18:23 2017 -0700 @@ -1159,7 +1159,7 @@ : name (expr_str.empty () ? sr.name () : expr_str), varval (expr_val.is_undefined () ? sr.varval () : expr_val), is_automatic (sr.is_automatic ()), - is_complex (varval.is_complex_type ()), + is_complex (varval.iscomplex ()), is_formal (sr.is_formal ()), is_global (sr.is_global ()), is_persistent (sr.is_persistent ()) @@ -1365,7 +1365,7 @@ bytes_info(j) = val.byte_size (); class_info(j) = val.class_name (); sparse_info(j) = val.is_sparse_type (); - complex_info(j) = val.is_complex_type (); + complex_info(j) = val.iscomplex (); nesting_info(j) = ni; }
--- a/libinterp/corefcn/xnorm.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/corefcn/xnorm.cc Mon Jun 12 21:18:23 2017 -0700 @@ -37,7 +37,7 @@ octave_value retval; bool isvector = (x.columns () == 1 || x.rows () == 1); - bool iscomplex = x.is_complex_type (); + bool iscomplex = x.iscomplex (); bool issparse = x.is_sparse_type (); bool isfloat = x.is_single_type (); @@ -93,7 +93,7 @@ { octave_value retval; - bool iscomplex = x.is_complex_type (); + bool iscomplex = x.iscomplex (); bool issparse = x.is_sparse_type (); bool isfloat = x.is_single_type (); @@ -132,7 +132,7 @@ { octave_value retval; - bool iscomplex = x.is_complex_type (); + bool iscomplex = x.iscomplex (); bool issparse = x.is_sparse_type (); bool isfloat = x.is_single_type (); @@ -171,7 +171,7 @@ { octave_value retval; - bool iscomplex = x.is_complex_type (); + bool iscomplex = x.iscomplex (); bool issparse = x.is_sparse_type (); bool isfloat = x.is_single_type ();
--- a/libinterp/dldfcn/__eigs__.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/dldfcn/__eigs__.cc Mon Jun 12 21:18:23 2017 -0700 @@ -74,7 +74,7 @@ if (tmp.length () && tmp(0).is_defined ()) { - if (! warned_imaginary && tmp(0).is_complex_type ()) + if (! warned_imaginary && tmp(0).iscomplex ()) { warning ("eigs: ignoring imaginary part returned from user-supplied function"); warned_imaginary = true; @@ -230,7 +230,7 @@ } else { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { if (args(0).is_sparse_type ()) { @@ -262,7 +262,7 @@ if (nargin > 1 + arg_offset && ! (args(1 + arg_offset).is_real_scalar ())) { - if (args(1+arg_offset).is_complex_type ()) + if (args(1+arg_offset).iscomplex ()) { b_arg = 1+arg_offset; have_b = true;
--- a/libinterp/dldfcn/amd.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/dldfcn/amd.cc Mon Jun 12 21:18:23 2017 -0700 @@ -90,7 +90,7 @@ if (args(0).is_sparse_type ()) { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { scm = args(0).sparse_complex_matrix_value (); n_row = scm.rows (); @@ -109,7 +109,7 @@ } else { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) sm = SparseMatrix (real (args(0).complex_matrix_value ())); else sm = SparseMatrix (args(0).matrix_value ());
--- a/libinterp/dldfcn/ccolamd.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/dldfcn/ccolamd.cc Mon Jun 12 21:18:23 2017 -0700 @@ -213,7 +213,7 @@ if (args(0).is_sparse_type ()) { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { scm = args(0).sparse_complex_matrix_value (); n_row = scm.rows (); @@ -235,7 +235,7 @@ } else { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) sm = SparseMatrix (real (args(0).complex_matrix_value ())); else sm = SparseMatrix (args(0).matrix_value ()); @@ -457,7 +457,7 @@ if (args(0).is_sparse_type ()) { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { scm = args(0).sparse_complex_matrix_value (); n_row = scm.rows (); @@ -476,7 +476,7 @@ } else { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) sm = SparseMatrix (real (args(0).complex_matrix_value ())); else sm = SparseMatrix (args(0).matrix_value ());
--- a/libinterp/dldfcn/chol.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/dldfcn/chol.cc Mon Jun 12 21:18:23 2017 -0700 @@ -210,7 +210,7 @@ else error ("chol: input matrix must be positive definite"); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { SparseComplexMatrix m = arg.sparse_complex_matrix_value (); @@ -255,7 +255,7 @@ else error ("chol: input matrix must be positive definite"); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { FloatComplexMatrix m = arg.float_complex_matrix_value (); @@ -288,7 +288,7 @@ else error ("chol: input matrix must be positive definite"); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexMatrix m = arg.complex_matrix_value (); @@ -389,7 +389,7 @@ else error ("cholinv: A must be positive definite"); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { SparseComplexMatrix m = arg.sparse_complex_matrix_value (); @@ -416,7 +416,7 @@ else error ("cholinv: A must be positive definite"); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { FloatComplexMatrix m = arg.float_complex_matrix_value (); @@ -443,7 +443,7 @@ else error ("cholinv: A must be positive definite"); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexMatrix m = arg.complex_matrix_value (); @@ -511,7 +511,7 @@ retval = octave::math::chol2inv (r); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { SparseComplexMatrix r = arg.sparse_complex_matrix_value (); @@ -528,7 +528,7 @@ retval = octave::math::chol2inv (r); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { FloatComplexMatrix r = arg.float_complex_matrix_value (); @@ -546,7 +546,7 @@ retval = octave::math::chol2inv (r); } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { ComplexMatrix r = arg.complex_matrix_value ();
--- a/libinterp/dldfcn/colamd.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/dldfcn/colamd.cc Mon Jun 12 21:18:23 2017 -0700 @@ -335,7 +335,7 @@ if (args(0).is_sparse_type ()) { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { scm = args(0).sparse_complex_matrix_value (); n_row = scm.rows (); @@ -357,7 +357,7 @@ } else { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) sm = SparseMatrix (real (args(0).complex_matrix_value ())); else sm = SparseMatrix (args(0).matrix_value ()); @@ -545,7 +545,7 @@ if (args(0).is_sparse_type ()) { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { scm = args(0).sparse_complex_matrix_value (); n_row = scm.rows (); @@ -564,7 +564,7 @@ } else { - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) sm = SparseMatrix (real (args(0).complex_matrix_value ())); else sm = SparseMatrix (args(0).matrix_value ()); @@ -670,7 +670,7 @@ if (args(0).is_sparse_type ()) error ("etree: S must be a sparse matrix"); - if (args(0).is_complex_type ()) + if (args(0).iscomplex ()) { SparseComplexMatrix scm = args(0).sparse_complex_matrix_value ();
--- a/libinterp/dldfcn/qr.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/dldfcn/qr.cc Mon Jun 12 21:18:23 2017 -0700 @@ -234,7 +234,7 @@ bool have_b = 0; bool vector_p = 0; - if (arg.is_complex_type ()) + if (arg.iscomplex ()) is_cmplx = true; if (nargin > 1) { @@ -264,7 +264,7 @@ else if (nargin == 3) // should be caught by is_scalar_type or is_string print_usage (); - if (have_b && args(1).is_complex_type ()) + if (have_b && args(1).iscomplex ()) is_cmplx = true; } @@ -356,7 +356,7 @@ break; } } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { octave::math::qr<FloatComplexMatrix>::type type = qr_type<FloatComplexMatrix> (nargin, nargout); @@ -440,7 +440,7 @@ break; } } - else if (arg.is_complex_type ()) + else if (arg.iscomplex ()) { octave::math::qr<ComplexMatrix>::type type = qr_type<ComplexMatrix> (nargin, nargout);
--- a/libinterp/dldfcn/symbfact.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/dldfcn/symbfact.cc Mon Jun 12 21:18:23 2017 -0700 @@ -144,7 +144,7 @@ if (a.rows () > 0 && a.cols () > 0) A->x = a.data (); } - else if (args(0).is_complex_type ()) + else if (args(0).iscomplex ()) { const SparseComplexMatrix a = args(0).sparse_complex_matrix_value (); A->nrow = a.rows ();
--- a/libinterp/octave-value/ov-base.h Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/octave-value/ov-base.h Mon Jun 12 21:18:23 2017 -0700 @@ -415,7 +415,7 @@ virtual bool is_real_type (void) const { return false; } - virtual bool is_complex_type (void) const { return false; } + virtual bool iscomplex (void) const { return false; } // Would be nice to get rid of the next four functions:
--- a/libinterp/octave-value/ov-complex.h Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/octave-value/ov-complex.h Mon Jun 12 21:18:23 2017 -0700 @@ -92,7 +92,7 @@ bool is_complex_scalar (void) const { return true; } - bool is_complex_type (void) const { return true; } + bool iscomplex (void) const { return true; } bool is_double_type (void) const { return true; }
--- a/libinterp/octave-value/ov-cx-diag.h Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/octave-value/ov-cx-diag.h Mon Jun 12 21:18:23 2017 -0700 @@ -65,7 +65,7 @@ bool is_complex_matrix (void) const { return true; } - bool is_complex_type (void) const { return true; } + bool iscomplex (void) const { return true; } bool is_double_type (void) const { return true; }
--- a/libinterp/octave-value/ov-cx-mat.h Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/octave-value/ov-cx-mat.h Mon Jun 12 21:18:23 2017 -0700 @@ -94,7 +94,7 @@ bool is_complex_matrix (void) const { return true; } - bool is_complex_type (void) const { return true; } + bool iscomplex (void) const { return true; } bool is_double_type (void) const { return true; }
--- a/libinterp/octave-value/ov-cx-sparse.h Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/octave-value/ov-cx-sparse.h Mon Jun 12 21:18:23 2017 -0700 @@ -97,7 +97,7 @@ bool is_complex_matrix (void) const { return true; } - bool is_complex_type (void) const { return true; } + bool iscomplex (void) const { return true; } bool is_double_type (void) const { return true; }
--- a/libinterp/octave-value/ov-flt-complex.h Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/octave-value/ov-flt-complex.h Mon Jun 12 21:18:23 2017 -0700 @@ -88,7 +88,7 @@ bool is_complex_scalar (void) const { return true; } - bool is_complex_type (void) const { return true; } + bool iscomplex (void) const { return true; } bool is_single_type (void) const { return true; }
--- a/libinterp/octave-value/ov-flt-cx-diag.h Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/octave-value/ov-flt-cx-diag.h Mon Jun 12 21:18:23 2017 -0700 @@ -63,7 +63,7 @@ bool is_complex_matrix (void) const { return true; } - bool is_complex_type (void) const { return true; } + bool iscomplex (void) const { return true; } bool is_single_type (void) const { return true; }
--- a/libinterp/octave-value/ov-flt-cx-mat.h Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/octave-value/ov-flt-cx-mat.h Mon Jun 12 21:18:23 2017 -0700 @@ -92,7 +92,7 @@ bool is_complex_matrix (void) const { return true; } - bool is_complex_type (void) const { return true; } + bool iscomplex (void) const { return true; } bool is_single_type (void) const { return true; }
--- a/libinterp/octave-value/ov.h Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/octave-value/ov.h Mon Jun 12 21:18:23 2017 -0700 @@ -677,8 +677,12 @@ bool is_real_type (void) const { return rep->is_real_type (); } + bool iscomplex (void) const + { return rep->iscomplex (); } + + OCTAVE_DEPRECATED ("use 'iscomplex' instead") bool is_complex_type (void) const - { return rep->is_complex_type (); } + { return rep->iscomplex (); } bool is_scalar_type (void) const { return rep->is_scalar_type (); }
--- a/libinterp/parse-tree/jit-typeinfo.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/parse-tree/jit-typeinfo.cc Mon Jun 12 21:18:23 2017 -0700 @@ -2218,7 +2218,7 @@ if (ov.is_range ()) return get_range (); - if (ov.is_double_type () && ! ov.is_complex_type ()) + if (ov.is_double_type () && ! ov.iscomplex ()) { if (ov.is_real_scalar ()) return get_scalar ();
--- a/libinterp/parse-tree/pt-tm-const.cc Mon Jun 12 17:53:28 2017 -0700 +++ b/libinterp/parse-tree/pt-tm-const.cc Mon Jun 12 21:18:23 2017 -0700 @@ -102,7 +102,7 @@ if (all_real && ! val.is_real_type ()) all_real = false; - if (all_cmplx && ! (val.is_complex_type () || val.is_real_type ())) + if (all_cmplx && ! (val.iscomplex () || val.is_real_type ())) all_cmplx = false; if (! any_cell && val.iscell ())