Commit fd623956 authored by Michele Martone's avatar Michele Martone

new patch: iscomplex has been replaced with is_complex_type.

parent a82433bc
Description: iscomplex has been replaced with is_complex_type.
Newer versions of Octave use iscomplex instead of is_complex_type.
Author: Michele Martone <michelemartone@users.sourceforge.net>
Forwarded: no
Last-Update: 2018-06-17
--- octave-sparsersb-1.0.5.orig/src/sparsersb.cc
+++ octave-sparsersb-1.0.5/src/sparsersb.cc
@@ -177,7 +177,7 @@
#ifdef RSB_NUMERICAL_TYPE_DOUBLE_COMPLEX
#define RSBOI_WANT_DOUBLE_COMPLEX 1
-#define ORSB_RSB_TYPE_FLAG(OBJ) (((OBJ).is_complex_type())?RSB_NUMERICAL_TYPE_DOUBLE:RSB_NUMERICAL_TYPE_DOUBLE_COMPLEX)
+#define ORSB_RSB_TYPE_FLAG(OBJ) (((OBJ).iscomplex())?RSB_NUMERICAL_TYPE_DOUBLE:RSB_NUMERICAL_TYPE_DOUBLE_COMPLEX)
#else
#define RSBOI_WANT_DOUBLE_COMPLEX 0
#define ORSB_RSB_TYPE_FLAG(OBJ) RSB_NUMERICAL_TYPE_DOUBLE
@@ -228,7 +228,7 @@ extern "C" {
}
#endif
#if RSBOI_WANT_DOUBLE_COMPLEX
-#define RSBOI_BINOP_PREVAILING_TYPE(V1,V2) (((V1).is_complex_type()||(V2).is_complex_type())?RSB_NUMERICAL_TYPE_DOUBLE_COMPLEX:RSB_NUMERICAL_TYPE_DOUBLE)
+#define RSBOI_BINOP_PREVAILING_TYPE(V1,V2) (((V1).iscomplex()||(V2).iscomplex())?RSB_NUMERICAL_TYPE_DOUBLE_COMPLEX:RSB_NUMERICAL_TYPE_DOUBLE)
#else
#define RSBOI_BINOP_PREVAILING_TYPE(V1,V2) RSBOI_TYPECODE
#endif
@@ -863,7 +863,7 @@ err:
bool is_diagonal (void) const { RSBOI_0_EMCHECK(this->mtxAp); RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG);return RSB_DO_FLAG_HAS(this->rsbflags(),RSB_FLAG_DIAGONAL)?true:false; }/* FIXME: new: not sure whether this is ever called */
bool is_lower_triangular (void) const { RSBOI_0_EMCHECK(this->mtxAp); RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG);return RSB_DO_FLAG_HAS(this->rsbflags(),RSB_FLAG_LOWER_TRIANGULAR)?true:false; }/* FIXME: new: not sure whether this is ever called */
bool is_upper_triangular (void) const { RSBOI_0_EMCHECK(this->mtxAp); RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG);return RSB_DO_FLAG_HAS(this->rsbflags(),RSB_FLAG_UPPER_TRIANGULAR)?true:false; }/* FIXME: new: not sure whether this is ever called */
- bool is_complex_type (void) const { RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); return !is_real_type(); }
+ bool iscomplex (void) const { RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG); return !is_real_type(); }
bool is_bool_type (void) const { return false; }
bool is_integer_type (void) const { return false; }
bool is_square (void) const { return this->rows()==this->cols(); }
@@ -1534,7 +1534,7 @@ octave_value rsboi_spsm(const octave_spa
rsb_err_t errval = RSB_ERR_NO_ERROR;
RSBOI_DEBUG_NOTICE(RSBOI_D_EMPTY_MSG);
- if(v1.is_complex_type())
+ if(v1.iscomplex())
{
ComplexMatrix retval = v2.complex_matrix_value();
octave_idx_type b_nc = retval.cols ();
@@ -1640,7 +1640,7 @@ DEFBINOP(ldiv, sparse_rsb_mtx, matrix)
if(v1.is__triangular())
return rsboi_spsm(v1,v2,RSB_TRANSPOSITION_N);
- if(v1.is_complex_type() || v2.is_complex_type())
+ if(v1.iscomplex() || v2.iscomplex())
return (v1.sparse_complex_matrix_value()).solve(v2.sparse_complex_matrix_value());
else
return (v1.sparse_matrix_value()).solve(v2.matrix_value());
@@ -1655,7 +1655,7 @@ DEFBINOP(trans_ldiv, sparse_rsb_mtx, mat
if(v1.is__triangular())
return rsboi_spsm(v1,v2,RSB_TRANSPOSITION_T);
- if(v1.is_complex_type() || v2.is_complex_type())
+ if(v1.iscomplex() || v2.iscomplex())
return (v1.sparse_complex_matrix_value().transpose()).solve(v2.sparse_complex_matrix_value());
else
return (v1.sparse_matrix_value().transpose()).solve(v2.matrix_value());
@@ -1671,7 +1671,7 @@ DEFBINOP(c_ldiv, sparse_rsb_mtx, matrix)
if(v1.is__triangular())
return rsboi_spsm(v1,v2,RSB_TRANSPOSITION_N);
- if(v1.is_complex_type() || v2.is_complex_type())
+ if(v1.iscomplex() || v2.iscomplex())
return (v1.sparse_complex_matrix_value()).solve(v2.sparse_complex_matrix_value());
else
return (v1.sparse_matrix_value()).solve(v2.matrix_value());
@@ -1685,7 +1685,7 @@ DEFBINOP(trans_c_ldiv, sparse_rsb_mtx, m
if(v1.is__triangular())
return rsboi_spsm(v1,v2,RSB_TRANSPOSITION_T);
- if(v1.is_complex_type() || v2.is_complex_type())
+ if(v1.iscomplex() || v2.iscomplex())
return (v1.sparse_complex_matrix_value().transpose()).solve(v2.sparse_complex_matrix_value());
else
return (v1.sparse_matrix_value().transpose()).solve(v2.matrix_value());
@@ -2199,8 +2199,8 @@ Please note that on @code{" RSBOI_FNS "}
int nargin = args.length ();
octave_value_list retval;
octave_sparsersb_mtx*osmp = RSBOI_NULL;
- bool ic0 = nargin>0?(args(0).is_complex_type()):false;
- bool ic3 = nargin>2?(args(2).is_complex_type()):false;
+ bool ic0 = nargin>0?(args(0).iscomplex()):false;
+ bool ic3 = nargin>2?(args(2).iscomplex()):false;
bool isr = (nargin>0 && args(0).type_name()==RSB_OI_TYPEINFO_STRING);
RSBOI_DEBUG_NOTICE("in sparsersb()\n");
@@ -2522,7 +2522,7 @@ Please note that on @code{" RSBOI_FNS "}
if(nargout) retval.append(osmp->cols()),--nargout;
if(nargout) retval.append(osmp->nnz()),--nargout;
if(nargout) retval.append(osmp->get_info_string()),--nargout;
- if(nargout) retval.append((!osmp->is_complex_type())?"real":"complex"),--nargout;
+ if(nargout) retval.append((!osmp->iscomplex())?"real":"complex"),--nargout;
if(nargout) retval.append(osmp->get_symmetry()),--nargout;
}
}
extra_space.patch
iscomplex.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment