public final class ArrayUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
any(TDoubleProcedure proc,
double[] v)
Returns true if the procedure proc returns true for any
element of the array v.
|
static boolean |
any(TObjectProcedure proc,
Object[][] v)
Returns true if the procedure proc returns true for any
element of the array v.
|
static boolean[] |
append(boolean[] v,
boolean elem)
Returns a new array with a single element appended at the end.
|
static int[] |
append(int[] v,
int elem)
Returns a new array with a single element appended at the end.
|
static Object[] |
append(Object[] v,
Object elem)
Returns a new array with a single element appended at the end.
|
static int |
argmax(double[] elems) |
static double |
count(int[] sampled,
int val)
Returns the number of times a value occurs in a given array.
|
static boolean |
equals(boolean[][] m1,
boolean[][] m2) |
static void |
forEach(TObjectProcedure proc,
Object[] v) |
static void |
forEach(TObjectProcedure proc,
Object[][] v) |
static int |
indexOf(int[] array,
int obj) |
static int |
indexOf(Object[] array,
Object obj) |
static void |
print(double[] v) |
static void |
print(int[] v) |
static String |
toString(double[] v) |
static String |
toString(int[] v) |
public static int indexOf(int[] array,
int obj)
public static boolean any(TDoubleProcedure proc, double[] v)
public static boolean any(TObjectProcedure proc, Object[][] v)
public static void forEach(TObjectProcedure proc, Object[] v)
public static void forEach(TObjectProcedure proc, Object[][] v)
public static void print(double[] v)
public static void print(int[] v)
public static String toString(int[] v)
public static String toString(double[] v)
public static int[] append(int[] v,
int elem)
v - Original arrayelem - Element to add to endpublic static boolean[] append(boolean[] v,
boolean elem)
v - Original arrayelem - Element to add to endpublic static Object[] append(Object[] v, Object elem)
v - Original arrayelem - Element to add to endpublic static double count(int[] sampled,
int val)
public static int argmax(double[] elems)
public static boolean equals(boolean[][] m1,
boolean[][] m2)
Copyright © 2019 JULIE Lab, Germany. All rights reserved.