org.optaplanner.examples.cheaptime.solver.move.factory
Class CheapTimePillarSlideMoveIteratorFactory
java.lang.Object
org.optaplanner.examples.cheaptime.solver.move.factory.CheapTimePillarSlideMoveIteratorFactory
- All Implemented Interfaces:
- MoveIteratorFactory
public class CheapTimePillarSlideMoveIteratorFactory
- extends Object
- implements MoveIteratorFactory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CheapTimePillarSlideMoveIteratorFactory
public CheapTimePillarSlideMoveIteratorFactory()
getSize
public long getSize(ScoreDirector scoreDirector)
- Specified by:
getSize
in interface MoveIteratorFactory
- Parameters:
scoreDirector
- never null, the ScoreDirector
which has the ScoreDirector.getWorkingSolution()
of which the Move
s need to be generated
- Returns:
- the approximate number of elements generated by
MoveIteratorFactory.createOriginalMoveIterator(ScoreDirector)
createOriginalMoveIterator
public Iterator<Move> createOriginalMoveIterator(ScoreDirector scoreDirector)
- Description copied from interface:
MoveIteratorFactory
- When it is called depends on the configured
SelectionCacheType
.
- Specified by:
createOriginalMoveIterator
in interface MoveIteratorFactory
- Parameters:
scoreDirector
- never null, the ScoreDirector
which has the ScoreDirector.getWorkingSolution()
of which the Move
s need to be generated
- Returns:
- never null, an
Iterator
that will end sooner or later
createRandomMoveIterator
public Iterator<Move> createRandomMoveIterator(ScoreDirector scoreDirector,
Random workingRandom)
- Description copied from interface:
MoveIteratorFactory
- When it is called depends on the configured
SelectionCacheType
.
- Specified by:
createRandomMoveIterator
in interface MoveIteratorFactory
- Parameters:
scoreDirector
- never null, the ScoreDirector
which has the ScoreDirector.getWorkingSolution()
of which the Move
s need to be generatedworkingRandom
- never null, the Random
to use when any random number is needed,
so EnvironmentMode.REPRODUCIBLE
works correctly
- Returns:
- never null, an
Iterator
that is allowed (or even presumed) to be never ending
Copyright © 2006-2015 JBoss by Red Hat. All Rights Reserved.