from . import islhelper
from .islhelper import mainctx, libisl, isl_set_basic_sets
-from .linexprs import Expression
+from .linexprs import Expression, Symbol
__all__ = [
symbols = set()
for item in iterator:
symbols.update(item.symbols)
- return tuple(sorted(symbols, key=lambda symbol: symbol.name))
+ return tuple(sorted(symbols, key=Symbol.sortkey))
@property
def polyhedra(self):
self = object().__new__(cls)
self._coefficients = OrderedDict()
for symbol, coefficient in sorted(coefficients,
- key=lambda item: item[0].name):
+ key=lambda item: item[0].sortkey()):
if isinstance(coefficient, Rational):
coefficient = coefficient.constant
if not isinstance(coefficient, numbers.Rational):
def dimension(self):
return 1
+ def sortkey(self):
+ return self.name,
+
def issymbol(self):
return True