|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.classifier.df.data.DataUtils
public final class DataUtils
Helper methods that deals with data lists and arrays of values
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 ties
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |