IntegerFactorization objects¶
- class sage.structure.factorization_integer.IntegerFactorization(x, unit=None, cr=False, sort=True, simplify=True, unsafe=False)[source]¶
- Bases: - Factorization- A lightweight class for an - IntegerFactorizationobject, inheriting from the more general- Factorizationclass.- In the - 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 - Integer.factor()method in- 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- Integerand an- int, as well as that the list is sorted.- AUTHOR: - Sebastian Pancratz (2010-01-10)