public final class DataUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
add(int[] array1,
int[] array2)
foreach i : array1[i] += array2[i]
|
static void |
dec(int[] array1,
int[] array2)
foreach i : array1[i] -= array2[i]
|
static int |
maxindex(Random rng,
int[] values)
return the index of the maximum of the array, breaking ties randomly
|
static int |
sum(int[] values)
Computes the sum of the values
|
public static int sum(int[] values)
public static void add(int[] array1, int[] array2)
public static void dec(int[] array1, int[] array2)
public static int maxindex(Random rng, int[] values)
rng
- used to break tiesCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.