public class CartesianProductMoveSelector extends CompositeMoveSelector
CompositeMoveSelector that Cartesian products 2 or more MoveSelectors.
For example: a Cartesian product of {A, B, C} and {X, Y} will result in {AX, AY, BX, BY, CX, CY}.
Warning: there is no duplicated Move check, so union of {A, B} and {B} will result in {AB, BB}.
CompositeMoveSelector| Modifier and Type | Class and Description |
|---|---|
class |
CartesianProductMoveSelector.OriginalCartesianProductMoveIterator |
class |
CartesianProductMoveSelector.RandomCartesianProductMoveIterator |
childMoveSelectorList, randomSelectionlogger, phaseLifecycleSupport, workingRandom| Constructor and Description |
|---|
CartesianProductMoveSelector(List<MoveSelector> childMoveSelectorList,
boolean ignoreEmptyChildIterators,
boolean randomSelection) |
| Modifier and Type | Method and Description |
|---|---|
long |
getSize()
A random JIT
Selector with Selector.isNeverEnding() true should return a size
as if it would be able to return each distinct element only once,
because the size can be used in SelectionProbabilityWeightFactory. |
boolean |
isNeverEnding()
Is true if
Selector.isCountable() is false
or if this selector is in random order (for most cases). |
Iterator<Move> |
iterator() |
String |
toString() |
getChildMoveSelectorList, isCountable, supportsPhaseAndSolverCachinggetCacheType, phaseEnded, phaseStarted, solvingEnded, solvingStarted, stepEnded, stepStartedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCacheTypephaseEnded, phaseStarted, stepEnded, stepStartedsolvingEnded, solvingStartedforEach, spliteratorpublic CartesianProductMoveSelector(List<MoveSelector> childMoveSelectorList, boolean ignoreEmptyChildIterators, boolean randomSelection)
public boolean isNeverEnding()
SelectorSelector.isCountable() is false
or if this selector is in random order (for most cases).
Is never true when this selector is in shuffled order (which is less scalable but more exact).Iterator.hasNext() of the Iterator created by Iterable.iterator()
never returns false (except when it's empty).public long getSize()
IterableSelectorSelector with Selector.isNeverEnding() true should return a size
as if it would be able to return each distinct element only once,
because the size can be used in SelectionProbabilityWeightFactory.Selector, always >= 0public String toString()
toString in class CompositeMoveSelectorCopyright © 2006–2021 JBoss by Red Hat. All rights reserved.