Class ModularArithmetic


  • public class ModularArithmetic
    extends java.lang.Object
    For compatibility
    Author:
    Manik Surtani
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int mod​(int numerator, int denominator)  
      static long mod​(long numerator, int denominator)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CANNOT_ASSUME_DENOM_IS_POWER_OF_TWO

        public static final boolean CANNOT_ASSUME_DENOM_IS_POWER_OF_TWO
    • Constructor Detail

      • ModularArithmetic

        public ModularArithmetic()
    • Method Detail

      • mod

        public static final int mod​(int numerator,
                                    int denominator)
      • mod

        public static final long mod​(long numerator,
                                     int denominator)