public class ArrayUtils
extends java.lang.Object
Constructor and Description |
---|
ArrayUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
l2norm(double[] x) |
static double |
l2norm2(double[] x) |
static double |
l2norm2(double[] x,
boolean skipLast) |
static int |
maxIndex(double[] from) |
static int |
maxIndex(double[] from,
java.util.Random rand) |
static void |
sort(int[] idxs,
double[] values)
Sort an integer array of indices based on values
Updates indices in place, keeps values the same
|
static void |
sort(int[] idxs,
double[] values,
int cutoff) |
public static double l2norm(double[] x)
public static double l2norm2(double[] x)
public static double l2norm2(double[] x, boolean skipLast)
public static int maxIndex(double[] from, java.util.Random rand)
public static int maxIndex(double[] from)
public static void sort(int[] idxs, double[] values)
idxs
- indicesvalues
- valuespublic static void sort(int[] idxs, double[] values, int cutoff)