public class ArrayUtil extends Object
Constructor and Description |
---|
ArrayUtil() |
Modifier and Type | Method and Description |
---|---|
static int[] |
addAllInt(int[] array1,
int[] array2) |
static long[] |
addAllLong(long[] array1,
long[] array2) |
static Object[] |
addAllObj(Object[] array1,
Object[] array2) |
static void |
addInt(int[] array,
int val) |
static int[] |
cloneInt(int[] array) |
static long[] |
cloneLong(long[] array) |
static Object[] |
cloneObj(Object[] array) |
static void |
copy1D(int[] to,
int[] from) |
static void |
copy2D(int[][] to,
int[][] from) |
static void |
copy3D(int[][][] to,
int[][][] from) |
static void |
copy4D(int[][][][] to,
int[][][][] from) |
static void |
copy5D(int[][][][][] to,
int[][][][][] from) |
static void |
copy6D(int[][][][][][] to,
int[][][][][][] from) |
static byte[][] |
create2D(int width,
int height) |
static int |
fill1D(int[] to,
int[] from,
int index) |
static int |
fill2D(int[][] to,
int[] from,
int index) |
static int |
fill3D(int[][][] to,
int[] from,
int index) |
static int |
fill4D(int[][][][] to,
int[] from,
int index) |
static int |
fill5D(int[][][][][] to,
int[] from,
int index) |
static int |
fill6D(int[][][][][][] to,
int[] from,
int index) |
static int[] |
flatten2D(int[][] is) |
static int[] |
flatten3D(int[][][] is) |
static int[] |
flatten4D(int[][][][] is) |
static int[] |
flatten5D(int[][][][][] is) |
static int |
max(int[] array) |
static byte[] |
padLeft(byte[] array,
int padLength) |
static void |
printMatrix(int[] array,
String format,
int width) |
static void |
printMatrixBytes(byte[] array,
String format,
int width) |
static void |
quickSort(int[] a,
int start,
int end,
int[] p)
Implements a quicksort algorithm
|
static byte[] |
randomByteArray(int size,
byte from,
byte to) |
static int[] |
randomIntArray(int size,
int from,
int to) |
static <T> void |
reverse(T[] frames) |
static int[][] |
rotate(int[][] src) |
static <T> void |
shiftLeft1(T[] array) |
static <T> void |
shiftLeft2(T[] array,
int from) |
static <T> void |
shiftLeft3(T[] array,
int from,
int to) |
static <T> void |
shiftRight1(T[] array) |
static <T> void |
shiftRight2(T[] array,
int to) |
static <T> void |
shiftRight3(T[] array,
int from,
int to) |
static int |
sumByte(byte[] array) |
static int |
sumByte3(byte[] array,
int from,
int count) |
static int |
sumInt(int[] array) |
static int |
sumInt3(int[] array,
int from,
int count) |
static void |
swap(int[] arr,
int ind1,
int ind2) |
static byte[] |
toByteArray(int[] ints) |
static byte[] |
toByteArrayShifted(int[] array) |
static byte[][] |
toByteArrayShifted2(int[][] intArray) |
static int[] |
toIntArray(byte[] bytes) |
static int[] |
toIntArrayUnshifted(byte[] bytes) |
static int[] |
toUnsignedIntArray(byte[] bytes) |
public static <T> void shiftRight1(T[] array)
public static <T> void shiftLeft1(T[] array)
public static <T> void shiftRight3(T[] array, int from, int to)
public static <T> void shiftLeft3(T[] array, int from, int to)
public static <T> void shiftLeft2(T[] array, int from)
public static <T> void shiftRight2(T[] array, int to)
public static final void swap(int[] arr, int ind1, int ind2)
public static final int sumInt(int[] array)
public static final int sumByte(byte[] array)
public static int sumInt3(int[] array, int from, int count)
public static int sumByte3(byte[] array, int from, int count)
public static void addInt(int[] array, int val)
public static int[] addAllInt(int[] array1, int[] array2)
public static long[] addAllLong(long[] array1, long[] array2)
public static int[] cloneInt(int[] array)
public static long[] cloneLong(long[] array)
public static byte[] toByteArrayShifted(int[] array)
public static byte[][] toByteArrayShifted2(int[][] intArray)
public static int[] toIntArrayUnshifted(byte[] bytes)
public static byte[] toByteArray(int[] ints)
public static int[] toIntArray(byte[] bytes)
public static int[] toUnsignedIntArray(byte[] bytes)
public static <T> void reverse(T[] frames)
public static int max(int[] array)
public static int[][] rotate(int[][] src)
public static byte[][] create2D(int width, int height)
public static void printMatrixBytes(byte[] array, String format, int width)
public static void printMatrix(int[] array, String format, int width)
public static byte[] padLeft(byte[] array, int padLength)
public static int[] randomIntArray(int size, int from, int to)
public static byte[] randomByteArray(int size, byte from, byte to)
public static void quickSort(int[] a, int start, int end, int[] p)
public static int[] flatten5D(int[][][][][] is)
public static int[] flatten4D(int[][][][] is)
public static int[] flatten3D(int[][][] is)
public static int[] flatten2D(int[][] is)
public static void copy6D(int[][][][][][] to, int[][][][][][] from)
public static void copy5D(int[][][][][] to, int[][][][][] from)
public static void copy4D(int[][][][] to, int[][][][] from)
public static void copy3D(int[][][] to, int[][][] from)
public static void copy2D(int[][] to, int[][] from)
public static void copy1D(int[] to, int[] from)
public static int fill6D(int[][][][][][] to, int[] from, int index)
public static int fill5D(int[][][][][] to, int[] from, int index)
public static int fill4D(int[][][][] to, int[] from, int index)
public static int fill3D(int[][][] to, int[] from, int index)
public static int fill2D(int[][] to, int[] from, int index)
public static int fill1D(int[] to, int[] from, int index)
Copyright © 2019. All rights reserved.