Module ojalgo

Class DivideAndConquer

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  DivideAndConquer.Conquerer
      A conquerer is a function that will be called with a range of indices to conquer.
      static class  DivideAndConquer.Divider
      A configurable divider that can be used to divide a range of indices and conquer each part in parallel.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void call​(java.util.concurrent.ExecutorService executor, int first, int limit, int threshold, int workers, DivideAndConquer.Conquerer conquerer)  
      protected abstract void conquer​(int first, int limit)  
      void invoke​(int first, int limit, int threshold)
      Synchronous execution - wait until it's finished.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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)