|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectIntArrays
public class IntArrays
A class consisting of static utility functions dealing with integer arrays.
Constructor Summary | |
---|---|
IntArrays()
|
Method Summary | |
---|---|
static int[] |
apply(int[] values,
int[] inds)
returns an array which is basically values[inds]. |
static int[] |
apply(int[] values,
int[] inds,
int[] result)
|
static int |
binarySearch(int value,
int[] array,
int minloc,
int maxloc)
searches for value in a sorted array between minloc and maxloc inclusive. |
static String |
convertToString(int[] values)
|
static int[] |
index(int size)
returns an array of length size where result[i]=i. |
static void |
index(int[] values)
Sets values[i]=i for all indices. |
static Integer[] |
integerArray(int size)
|
static Integer[] |
integerIndex(int[] vals)
|
static void |
print(int[] values,
PrintStream stream)
displays the integer array on System.stream |
static void |
println(int[] values,
PrintStream stream)
displays the integer array on System.stream |
static void |
shuffle(int[] values)
Will shuffle the values in the integer array. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntArrays()
Method Detail |
---|
public static int binarySearch(int value, int[] array, int minloc, int maxloc)
public static int[] apply(int[] values, int[] inds)
public static int[] apply(int[] values, int[] inds, int[] result)
public static void index(int[] values)
public static int[] index(int size)
public static String convertToString(int[] values)
public static void print(int[] values, PrintStream stream)
public static void println(int[] values, PrintStream stream)
public static void shuffle(int[] values)
public static Integer[] integerIndex(int[] vals)
public static Integer[] integerArray(int size)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |