|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bulletphysics.linearmath.MiscUtil
public class MiscUtil
Miscellaneous utility functions.
Constructor Summary | |
---|---|
MiscUtil()
|
Method Summary | ||
---|---|---|
static
|
ensureIndex(ObjectArrayList<T> list,
int index,
T value)
Ensures valid index in provided list by filling list with provided values until the index is valid. |
|
static float |
GEN_clamped(float a,
float lb,
float ub)
|
|
static int |
getListCapacityForHash(int size)
|
|
static int |
getListCapacityForHash(ObjectArrayList<?> list)
|
|
static
|
heapSort(ObjectArrayList<T> list,
Comparator<T> comparator)
Sorts list using heap sort. |
|
static
|
indexOf(T[] array,
T obj)
Searches object in array. |
|
static
|
quickSort(ObjectArrayList<T> list,
Comparator<T> comparator)
Sorts list using quick sort. |
|
static void |
resize(FloatArrayList list,
int size,
float value)
Resizes list to exact size, filling with given value when expanding. |
|
static void |
resize(IntArrayList list,
int size,
int value)
Resizes list to exact size, filling with given value when expanding. |
|
static
|
resize(ObjectArrayList<T> list,
int size,
Class<T> valueCls)
Resizes list to exact size, filling with new instances of given class type when expanding. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MiscUtil()
Method Detail |
---|
public static int getListCapacityForHash(ObjectArrayList<?> list)
public static int getListCapacityForHash(int size)
public static <T> void ensureIndex(ObjectArrayList<T> list, int index, T value)
public static void resize(IntArrayList list, int size, int value)
public static void resize(FloatArrayList list, int size, float value)
public static <T> void resize(ObjectArrayList<T> list, int size, Class<T> valueCls)
public static <T> int indexOf(T[] array, T obj)
public static float GEN_clamped(float a, float lb, float ub)
public static <T> void heapSort(ObjectArrayList<T> list, Comparator<T> comparator)
Implementation from: http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/
public static <T> void quickSort(ObjectArrayList<T> list, Comparator<T> comparator)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |