OptaPlanner distribution 6.2.1-SNAPSHOT

org.optaplanner.examples.cheaptime.solver.move.factory
Class CheapTimePillarSlideMoveIteratorFactory

java.lang.Object
  extended by org.optaplanner.examples.cheaptime.solver.move.factory.CheapTimePillarSlideMoveIteratorFactory
All Implemented Interfaces:
MoveIteratorFactory

public class CheapTimePillarSlideMoveIteratorFactory
extends Object
implements MoveIteratorFactory


Constructor Summary
CheapTimePillarSlideMoveIteratorFactory()
           
 
Method Summary
 Iterator<Move> createOriginalMoveIterator(ScoreDirector scoreDirector)
          When it is called depends on the configured SelectionCacheType.
 Iterator<Move> createRandomMoveIterator(ScoreDirector scoreDirector, Random workingRandom)
          When it is called depends on the configured SelectionCacheType.
 long getSize(ScoreDirector scoreDirector)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheapTimePillarSlideMoveIteratorFactory

public CheapTimePillarSlideMoveIteratorFactory()
Method Detail

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 Moves 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 Moves 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 Moves need to be generated
workingRandom - 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

OptaPlanner distribution 6.2.1-SNAPSHOT

Copyright © 2006-2015 JBoss by Red Hat. All Rights Reserved.