org.carrot2.filter.lingo.util.arrays
Class ArrayUtils
java.lang.Object
org.carrot2.filter.lingo.util.arrays.ArrayUtils
public class ArrayUtils
- extends Object
- Author:
- stachoo
|
Method Summary |
static double |
average(double[] array)
|
static int[] |
clone(int[] array)
|
static String[] |
clone(String[] array)
|
static boolean |
contains(int[] array,
int value)
|
static int[] |
extend(int[] array,
int newValue)
|
static boolean[] |
project(boolean[] array,
int[] projection)
|
static double[] |
project(double[] array,
int[] projection)
|
static int[] |
project(int[] array,
int[] projection)
|
static int[][] |
split(int[] array,
int[] boundaries)
|
static double |
stdDev(double[] array)
|
static String |
toString(int[] array)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrayUtils
public ArrayUtils()
toString
public static String toString(int[] array)
- Parameters:
array -
- Returns:
- String
clone
public static int[] clone(int[] array)
clone
public static String[] clone(String[] array)
extend
public static int[] extend(int[] array,
int newValue)
- Parameters:
array - newValue -
- Returns:
- int[]
split
public static int[][] split(int[] array,
int[] boundaries)
- Parameters:
array - boundaries -
project
public static double[] project(double[] array,
int[] projection)
- Parameters:
array - projection -
- Returns:
- double[]
project
public static int[] project(int[] array,
int[] projection)
- Parameters:
array - projection -
- Returns:
- int[]
project
public static boolean[] project(boolean[] array,
int[] projection)
- Parameters:
array - projection -
- Returns:
- boolean[]
contains
public static boolean contains(int[] array,
int value)
- Parameters:
array - value -
- Returns:
- boolean
average
public static double average(double[] array)
- Parameters:
array -
stdDev
public static double stdDev(double[] array)
- Parameters:
array -
Copyright (c) Dawid Weiss, Stanislaw Osinski