Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Beta2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.optaplanner.core.impl.heuristic.selector.move.factory
Interface MoveIteratorFactory

All Known Implementing Classes:
  CheapTimePillarSlideMoveIteratorFactory

    public interface MoveIteratorFactory

An interface to generate an `Iterator` of custom `Move`s.

For a more simple version, see `MoveListFactory`.

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)`

Method Detail

### getSize

    long getSize(ScoreDirector scoreDirector)

  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 `createOriginalMoveIterator(ScoreDirector)`
  Throws:
    `UnsupportedOperationException` - if not supported

### createOriginalMoveIterator

    Iterator<Move> createOriginalMoveIterator(ScoreDirector scoreDirector)

  When it is called depends on the configured `SelectionCacheType`.

  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
  Throws:
    `UnsupportedOperationException` - if only `createRandomMoveIterator(ScoreDirector, Random)` is supported

### createRandomMoveIterator

    Iterator<Move> createRandomMoveIterator(ScoreDirector scoreDirector,
                                            Random workingRandom)

  When it is called depends on the configured `SelectionCacheType`.

  Parameters:
    `scoreDirector` - never null, the `ScoreDirector` which has the `ScoreDirector.getWorkingSolution()` of which the `Move`s 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
  Throws:
    `UnsupportedOperationException` - if only `createOriginalMoveIterator(ScoreDirector)` is supported

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Beta2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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