Class Demo3_Memoize


  • public class Demo3_Memoize
    extends Object
    Demos of memoization.
    Author:
    Herbert Praehofer
    • Constructor Detail

      • Demo3_Memoize

        public Demo3_Memoize()
    • Method Detail

      • main

        public static void main​(String[] args)
      • isPrime

        static boolean isPrime​(long n)
      • isPrimeWithCache

        public static boolean isPrimeWithCache​(long n)
      • memoize2

        public static <T,​R> Function<T,​R> memoize2​(Function<T,​R> fn)