Class LongWTables


  • public class LongWTables
    extends LongModMath
    Helper class for generating and caching tables of powers of the n:th root of unity.
    Since:
    1.7.0
    Version:
    1.9.0
    • Field Detail

      • cache

        private static java.util.concurrent.ConcurrentMap<java.util.List<java.lang.Integer>,​long[]> cache
    • Constructor Detail

      • LongWTables

        private LongWTables()
    • Method Detail

      • getWTable

        public static long[] getWTable​(int modulus,
                                       int length)
        Get a table of powers of n:th root of unity.
        Parameters:
        modulus - The index of the modulus to be used.
        length - The length of the table to be returned, i.e. n.
        Returns:
        The table of powers of the n:th root of unity.
      • getInverseWTable

        public static long[] getInverseWTable​(int modulus,
                                              int length)
        Get a table of inverses of powers of n:th root of unity.
        Parameters:
        modulus - The index of the modulus to be used.
        length - The length of the table to be returned, i.e. n.
        Returns:
        The table of inverses of powers of the n:th root of unity.
      • getWTable

        private static long[] getWTable​(int modulus,
                                        int length,
                                        boolean isInverse)
      • getInstance

        private static LongModMath getInstance​(int modulus)