Package slice.studio

Class Slices

java.lang.Object
slice.studio.Slices

public class Slices
extends java.lang.Object
Author:
__STUDENT_NAME__, Finn Voichick, Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
  • Constructor Details

  • Method Details

    • createNSlices

      public static java.util.List<IndexedRange> createNSlices​(int minInclusive, int maxExclusive, int numSlices)
      Should create a list of IndexedRange objects of length numSlices. Each slice in the returned result should be allocated a balanced amount of the range. Any remaining data should be distributed one each to the front slices.
      Parameters:
      minInclusive - minimum (inclusive) of the range to slice
      maxExclusive - maximum (exclusive) of the range to slice
      numSlices - the number of slices to divide [minInclusive, maxExclusive) into
      Returns:
      the created list of slices
    • createNSlices

      public static <C> java.util.List<IndexedRange> createNSlices​(C[] data, int numSlices)
    • createNSlices

      public static java.util.List<IndexedRange> createNSlices​(byte[] data, int numSlices)
    • createNSlices

      public static java.util.List<IndexedRange> createNSlices​(char[] data, int numSlices)
    • createNSlices

      public static java.util.List<IndexedRange> createNSlices​(short[] data, int numSlices)
    • createNSlices

      public static java.util.List<IndexedRange> createNSlices​(int[] data, int numSlices)
    • createNSlices

      public static java.util.List<IndexedRange> createNSlices​(long[] data, int numSlices)
    • createNSlices

      public static java.util.List<IndexedRange> createNSlices​(float[] data, int numSlices)
    • createNSlices

      public static java.util.List<IndexedRange> createNSlices​(double[] data, int numSlices)