for i, equality in enumerate(equalities):
if not isinstance(equality, Expression):
raise TypeError('equalities must be linear expressions')
- equalities[i] = equality._toint()
+ equalities[i] = equality.scaleint()
if inequalities is None:
inequalities = []
else:
for i, inequality in enumerate(inequalities):
if not isinstance(inequality, Expression):
raise TypeError('inequalities must be linear expressions')
- inequalities[i] = inequality._toint()
+ inequalities[i] = inequality.scaleint()
symbols = cls._xsymbols(equalities + inequalities)
islbset = cls._toislbasicset(equalities, inequalities, symbols)
return cls._fromislbasicset(islbset, symbols)
constant = islhelper.isl_val_to_int(constant)
coefficients = {}
for index, symbol in enumerate(symbols):
- coefficient = libisl.isl_constraint_get_coefficient_val(islconstraint, libisl.isl_dim_set, index)
+ coefficient = libisl.isl_constraint_get_coefficient_val(islconstraint,
+ libisl.isl_dim_set, index)
coefficient = islhelper.isl_val_to_int(coefficient)
if coefficient != 0:
coefficients[symbol] = coefficient