Class ModuloApintField

    • Constructor Detail

      • ModuloApintField

        public ModuloApintField​(org.apfloat.Apint value)
        Constructs a new integer field object with the specified value.
        Parameters:
        value - The value.
    • Method Detail

      • getModulus

        public static org.apfloat.Apint getModulus()
        Returns the modulus or null if modulo reduction is not done. The modulus can be set in a thread-specific way using LocalContext.
        Returns:
        The local modulus or null if modulo reduction is not done.
        See Also:
        setModulus(org.apfloat.Apint)
      • setModulus

        public static void setModulus​(org.apfloat.Apint modulus)
        Sets the modulus. The modulus can be set in a thread-specific way using LocalContext.
        Parameters:
        modulus - The modulus or null if modulo reduction is not done.
        Throws:
        IllegalArgumentException - If modulus is not positive.
      • reduce

        public static org.apfloat.Apint reduce​(org.apfloat.Apint value)
        Reduce the value with the current modulus.
        Parameters:
        value - The value.
        Returns:
        The value mod the current modulus.