Class Lehman_CustomKOrder
- java.lang.Object
-
- de.tilman_neumann.jml.factor.FactorAlgorithm
-
- de.tilman_neumann.jml.factor.lehman.Lehman_CustomKOrder
-
public class Lehman_CustomKOrder extends FactorAlgorithm
A variant of Lehman's algorithm that allows to arrange the k's in arrays of different "performance levels". k-values that perform very well like those divisible by 315 are tested before others that do not perform that well. For large k we also use congruences of a == kN (mod 2^s) instead of Lehman's a == (k+N) (mod 2^s), which seem to be slightly more discriminative.
-
-
Field Summary
-
Fields inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
DEFAULT, NUM_PRIMES_FOR_31_BIT_TDIV, tdivLimit
-
-
Constructor Summary
Constructors Constructor Description Lehman_CustomKOrder(boolean doTDivFirst)Full constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longfindSingleFactor(long N)BigIntegerfindSingleFactor(BigInteger N)Find a single factor of the given N, which is composite and odd.StringgetName()static voidmain(String[] args)Test.-
Methods inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
factor, factor, searchFactors
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein classFactorAlgorithm- Returns:
- The name of the algorithm, possibly including important parameters.
-
findSingleFactor
public BigInteger findSingleFactor(BigInteger N)
Description copied from class:FactorAlgorithmFind a single factor of the given N, which is composite and odd.- Specified by:
findSingleFactorin classFactorAlgorithm- Returns:
- factor
-
findSingleFactor
public long findSingleFactor(long N)
-
main
public static void main(String[] args)
Test.- Parameters:
args- ignored
-
-