Class DivideAndConquer


  • public abstract class DivideAndConquer
    extends java.lang.Object
    • Constructor Detail

      • DivideAndConquer

        public DivideAndConquer()
    • Method Detail

      • call

        static void call​(java.util.concurrent.ExecutorService executor,
                         int first,
                         int limit,
                         int threshold,
                         int workers,
                         DivideAndConquer.Conquerer conquerer)
      • invoke

        public final void invoke​(int first,
                                 int limit,
                                 int threshold)
        Synchronous execution - wait until it's finished.
        Parameters:
        first - The first index, in a range, to include.
        limit - The first index NOT to include - last (excl.) index in a range.
      • conquer

        protected abstract void conquer​(int first,
                                        int limit)