public enum ArrayUtils extends Enum<ArrayUtils>
Modifier and Type | Method and Description |
---|---|
static int[] |
append(int[]... toAppend)
Append int arrays
|
static <T> T[] |
append(T[]... toAppend)
Append two Arrays
|
static <T> boolean |
contains(T[] array,
T obj) |
static int[] |
createNonRedundantSortedValues(gnu.trove.list.array.TIntArrayList values) |
static int[] |
flatten(int[][] matrix) |
static <T> T[] |
flatten(T[][] matrix) |
static <T> T[] |
flatten(T[][][] matrix) |
static <T> T[] |
flattenSubMatrix(int iMin,
int iLength,
int jMin,
int jLength,
T[][] matrix) |
static <T> T |
get(int index,
List<T>... arrays) |
static <T> T |
get(int index,
T[]... arrays) |
static <T> T[] |
getColumn(T[][] array,
int column) |
static <T> T[] |
getColumn(T[][] array,
int column,
Class clazz) |
static void |
inverseSign(int[] tab)
Reverse all signs of the a given int table.
|
static <T> int |
length(T[]... arrays) |
static int[] |
linspace(int begin,
int end) |
static int[] |
oneToN(int n) |
static <T> void |
permutation(int[] permutation,
T[] tab)
apply a permuation on an array
|
static <E> E[] |
randomPermutations(E[] tab,
long seed) |
static <E> E[] |
randomPermutations(E[] tab,
Random r) |
static int[] |
randomPermutations(int[] tab,
long seed) |
static int[] |
randomPermutations(int[] tab,
Random r) |
static void |
reverse(int[] tab) |
static <T> void |
reverse(T[] tab) |
static <T extends Comparable<T>> |
sort(Set<T> set) |
static int[][][] |
swallowCopy(int[][][] arr) |
static int[][][][] |
swallowCopy(int[][][][] arr) |
static <T> T[] |
toArray(ArrayList<T> list) |
static <T> T[] |
toArray(Class c,
List<T> list) |
static <T> T[] |
toArray(T... elt) |
static <T> List<T> |
toList(T[] array) |
static int[][] |
transpose(int[][] matrix) |
static <T> T[][] |
transpose(T[][] matrix) |
static ArrayUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ArrayUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static int[] |
zeroToN(int n) |
static int[] |
zeroToNShuffle(int nb) |
static int[] |
zeroToNShuffle(int nb,
long seed) |
public static ArrayUtils[] values()
for (ArrayUtils c : ArrayUtils.values()) System.out.println(c);
public static ArrayUtils valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static int[] zeroToN(int n)
public static int[] oneToN(int n)
public static int[] linspace(int begin, int end)
public static <T> T[] getColumn(T[][] array, int column)
public static <T> T[] getColumn(T[][] array, int column, Class clazz)
@SafeVarargs public static <T> int length(T[]... arrays)
public static <T> boolean contains(T[] array, T obj)
@SafeVarargs public static <T> T get(int index, T[]... arrays)
@SafeVarargs public static <T> T get(int index, List<T>... arrays)
public static <T> T[] append(T[]... toAppend)
toAppend
- array of arrays to appendpublic static int[] append(int[]... toAppend)
toAppend
- array of arrays to appendpublic static void inverseSign(int[] tab)
tab
- array to inversepublic static void reverse(int[] tab)
public static <T> void reverse(T[] tab)
public static <T> void permutation(int[] permutation, T[] tab)
public static <T> List<T> toList(T[] array)
@SafeVarargs public static <T> T[] toArray(T... elt)
public static <T> T[] toArray(ArrayList<T> list)
public static <T> T[][] transpose(T[][] matrix)
public static int[][] transpose(int[][] matrix)
public static <T> T[] flatten(T[][] matrix)
public static <T> T[] flatten(T[][][] matrix)
public static <T> T[] flattenSubMatrix(int iMin, int iLength, int jMin, int jLength, T[][] matrix)
public static int[] flatten(int[][] matrix)
public static int[] createNonRedundantSortedValues(gnu.trove.list.array.TIntArrayList values)
public static <T extends Comparable<T>> T[] sort(Set<T> set)
public static int[][][][] swallowCopy(int[][][][] arr)
public static int[][][] swallowCopy(int[][][] arr)
public static int[] zeroToNShuffle(int nb)
public static int[] zeroToNShuffle(int nb, long seed)
public static int[] randomPermutations(int[] tab, Random r)
public static int[] randomPermutations(int[] tab, long seed)
public static <E> E[] randomPermutations(E[] tab, Random r)
public static <E> E[] randomPermutations(E[] tab, long seed)
Copyright © 2015. All rights reserved.