Class EnumPartition<E extends Enum<E>>
java.lang.Object
org.ojalgo.type.EnumPartition<E>
Keeps track of n (ordered)
Enum values – any Enum and any number of values. This is a
generalised version of IndexSelector.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCount the number of times a specific value appears.intGeneralised version ofcount(Enum)that allows to instead count the number of times something else is set.int[]Get the indices where this value is set.int[]Generalised version ofextract(Enum)that allows to instead get the negated (complement) set of indices.voidGeneralised version ofextract(Enum, boolean)that allows to supply the array the resulting indices should be written to.voidDeprecated.get(int index) booleanvoidintsize()void
-
Field Details
-
myConstants
-
myCounts
private final int[] myCounts -
myValues
private final byte[] myValues
-
-
Constructor Details
-
EnumPartition
-
-
Method Details
-
count
Count the number of times a specific value appears. -
count
Generalised version ofcount(Enum)that allows to instead count the number of times something else is set. -
extract
Get the indices where this value is set. -
extract
Generalised version ofextract(Enum)that allows to instead get the negated (complement) set of indices. -
extract
Generalised version ofextract(Enum, boolean)that allows to supply the array the resulting indices should be written to. -
fill
Deprecated.v56 Usereset(E)instead -
get
-
is
-
reset
-
size
public int size() -
update
-
reset(E)instead