A class for keeping track of factorization.
The given number must be a composite. number is stored in the attribute 'number'. The factors will be stored in the attribute 'factors', and primality of factors will be tracked in the attribute 'primality'.
Return the next target which meets cond. if cond is not specified, then the next target is a composite (or unknown primality) factor of self.number. cond can be a binary (arguments are base and index) predicate.
If there is no such factor, LookupError will be raised.
Return the factors in the form of [(base, index), ...].
Register a divisor of the number, if the divisor is a true
divisor of the number. The number is divided by the divisor
as many times as possible.
The optional argument isprime tells the primality of the divisor (default to unknown).
Sort factors list. This affects the result of getResult.