Class TDiv31Barrett


  • public class TDiv31Barrett
    extends FactorAlgorithm
    Trial division using long-valued Barrett reduction, see https://en.wikipedia.org/wiki/Barrett_reduction. Significantly faster than TDiv31Inverse.
    • Constructor Detail

      • TDiv31Barrett

        public TDiv31Barrett()
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in class FactorAlgorithm
        Returns:
        The name of the algorithm, possibly including important parameters.
      • factor

        public void factor​(BigInteger Nbig,
                           int Nexp,
                           SortedMultiset<BigInteger> primeFactors)
        Find all factor of NBig, which must have less than 32 bit.
        Parameters:
        Nbig -
        Nexp - the exponent which with found factors are added to primeFactors
        primeFactors -
      • findSingleFactor

        public int findSingleFactor​(int N)