public class MoveIteratorFactoryToMoveSelectorBridge extends AbstractMoveSelector
MoveIteratorFactory
to a MoveSelector
.Modifier and Type | Field and Description |
---|---|
protected MoveIteratorFactory |
moveIteratorFactory |
protected boolean |
randomSelection |
protected ScoreDirector |
scoreDirector |
logger, solverPhaseLifecycleSupport, workingRandom
Constructor and Description |
---|
MoveIteratorFactoryToMoveSelectorBridge(MoveIteratorFactory moveIteratorFactory,
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 |
isContinuous()
If true, then
Selector.isNeverEnding() is also true. |
boolean |
isNeverEnding()
Is true if
Selector.isContinuous() is true
or if this selector is in random order (for most cases). |
Iterator<Move> |
iterator() |
void |
phaseEnded(AbstractSolverPhaseScope phaseScope) |
void |
phaseStarted(AbstractSolverPhaseScope phaseScope) |
String |
toString() |
getCacheType, solvingEnded, solvingStarted, stepEnded, stepStarted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCacheType
stepEnded, stepStarted
solvingEnded, solvingStarted
protected final MoveIteratorFactory moveIteratorFactory
protected final boolean randomSelection
protected ScoreDirector scoreDirector
public MoveIteratorFactoryToMoveSelectorBridge(MoveIteratorFactory moveIteratorFactory, boolean randomSelection)
public void phaseStarted(AbstractSolverPhaseScope phaseScope)
phaseStarted
in interface SolverPhaseLifecycleListener
phaseStarted
in class AbstractSelector
public void phaseEnded(AbstractSolverPhaseScope phaseScope)
phaseEnded
in interface SolverPhaseLifecycleListener
phaseEnded
in class AbstractSelector
public boolean isContinuous()
Selector
Selector.isNeverEnding()
is also true.public boolean isNeverEnding()
Selector
Selector.isContinuous()
is true
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.public long getSize()
IterableSelector
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
.Selector
, always >= 0Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.