Enum Class LongMath.MillerRabinTester

java.lang.Object
java.lang.Enum<LongMath.MillerRabinTester>
com.google.common.math.LongMath.MillerRabinTester
All Implemented Interfaces:
Serializable, Comparable<LongMath.MillerRabinTester>, Constable
Enclosing class:
LongMath

private static enum LongMath.MillerRabinTester extends Enum<LongMath.MillerRabinTester>
  • Enum Constant Details

  • Constructor Details

    • MillerRabinTester

      private MillerRabinTester()
  • Method Details

    • values

      public static LongMath.MillerRabinTester[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LongMath.MillerRabinTester valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • test

      static boolean test(long base, long n)
    • mulMod

      abstract long mulMod(long a, long b, long m)
      Returns a * b mod m.
    • squareMod

      abstract long squareMod(long a, long m)
      Returns a^2 mod m.
    • powMod

      private long powMod(long a, long p, long m)
      Returns a^p mod m.
    • testWitness

      private boolean testWitness(long base, long n)
      Returns true if n is a strong probable prime relative to the specified base.