|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjbil.util.BooleanArrayUtilities
public class BooleanArrayUtilities
Assorted boolean utility functions.
Constructor Summary | |
---|---|
BooleanArrayUtilities()
|
Method Summary | |
---|---|
static boolean[] |
asIndicatorVector(int size,
int[] trueElements)
Creates an indicator array (boolean mask) from its size and the indexes of the true elements. |
static int[] |
falseIndexes(boolean[] b)
Returns an int array containing the indexes of the false entries of a boolean array. |
static int |
falseIndexesCount(boolean[] b)
Counts the false entries of a boolean array. |
static void |
invert(boolean[] b)
Inverts a boolean array. |
static int[] |
trueIndexes(boolean[] b)
Returns an int array containing the indexes of the true entries of a boolean array. |
static int |
trueIndexesCount(boolean[] b)
Counts the true entries of a boolean array. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BooleanArrayUtilities()
Method Detail |
---|
public static int trueIndexesCount(boolean[] b)
public static int[] trueIndexes(boolean[] b)
public static int falseIndexesCount(boolean[] b)
public static int[] falseIndexes(boolean[] b)
public static boolean[] asIndicatorVector(int size, int[] trueElements)
size
- The size of the indicator vector.trueElements
- The indexes of the true elements.public static void invert(boolean[] b)
b
- The array to be inverted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |