public final class IndexSelector extends Object
Constructor and Description |
---|
IndexSelector(int aCount) |
IndexSelector(int aCount,
int[] someInitiallyIncludedIndeces) |
Modifier and Type | Method and Description |
---|---|
int |
countExcluded() |
int |
countIncluded() |
void |
exclude(int anIndexToExclude) |
void |
exclude(int[] someIndecesToExclude) |
void |
excludeAll() |
int[] |
getExcluded() |
int[] |
getIncluded() |
int |
getLastExcluded() |
int |
getLastIncluded() |
void |
grow()
Randomly include 1 of the currently excluded
|
void |
include(int indexToInclude) |
void |
include(int[] someIndecesToInclude) |
void |
includeAll() |
boolean |
isLastExcluded()
Is the last excluded index still excluded, or has it been included by a later operation?
|
boolean |
isLastIncluded()
Is the last included index still included, or has it been excluded by a later operation?
|
void |
revertLastExclusion() |
void |
revertLastInclusion() |
void |
shrink()
Randomly exclude 1 of the currently included
|
void |
shuffle()
Randomly exclude 1 of the currently included and include 1 of the excluded
|
int |
size() |
String |
toString() |
public IndexSelector(int aCount)
public IndexSelector(int aCount, int[] someInitiallyIncludedIndeces)
public int countExcluded()
public int countIncluded()
public void exclude(int anIndexToExclude)
public void exclude(int[] someIndecesToExclude)
public void excludeAll()
public int[] getExcluded()
public int[] getIncluded()
public int getLastExcluded()
public int getLastIncluded()
public void grow()
public void include(int indexToInclude)
public void include(int[] someIndecesToInclude)
public void includeAll()
public boolean isLastExcluded()
public boolean isLastIncluded()
public void revertLastExclusion()
public void revertLastInclusion()
public void shrink()
public void shuffle()
public int size()
Copyright © 2019 Optimatika. All rights reserved.