- class sage.structure.factorization_integer.IntegerFactorization(x, unit=None, cr=False, sort=True, simplify=True, unsafe=False)#
A lightweight class for an
IntegerFactorizationobject, inheriting from the more general
Factorizationclass the user has to create a list containing the factorization data, which is then passed to the actual
Factorizationobject upon initialization.
However, for the typical use of integer factorization via the
sage.rings.integerthis is noticeably too much overhead, slowing down the factorization of integers of up to about 40 bits by a factor of around 10. Moreover, the initialization done in the
Factorizationclass is typically unnecessary: the caller can guarantee that the list contains pairs of an
int, as well as that the list is sorted.
Sebastian Pancratz (2010-01-10)