X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/eb2eadbbeeaf00d7e2af18e6c8ee47602f96e528..29ed88d1a15d283ea6f3340a4dd97e8cc7c2d2d4:/pypol/polyhedra.py diff --git a/pypol/polyhedra.py b/pypol/polyhedra.py index ac67cf8..6ef7cc1 100644 --- a/pypol/polyhedra.py +++ b/pypol/polyhedra.py @@ -44,14 +44,14 @@ class Polyhedron(Domain): 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) @@ -95,7 +95,8 @@ class Polyhedron(Domain): 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