org.optaplanner.core.impl.heuristic.selector.common.nearby

## Interface NearbyRandom

- All Known Implementing Classes:
    BetaDistributionNearbyRandom, BlockDistributionNearbyRandom, LinearDistributionNearbyRandom, ParabolicDistributionNearbyRandom

      public interface NearbyRandom

  Strategy pattern to select a index of a nearby ordered value range according to a probability distribution.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getOverallSizeMaximum()` Used to limit the RAM memory size of the nearby distance matrix.
    `int` | `nextInt(Random random, int nearbySize)`

- - ### Method Detail

    - #### nextInt

          int nextInt(Random random,
                      int nearbySize)

      Parameters:
        `random` - never null
        `nearbySize` - never negative. The number of available values to select from. Normally this is the size of the value range for a non-chained variable and the size of the value range (= size of the entity list) minus 1 for a chained variable.
      Returns:
        `0 <= x < nearbySize`

    - #### getOverallSizeMaximum

          int getOverallSizeMaximum()

      Used to limit the RAM memory size of the nearby distance matrix.
      Returns:
        one more than the maximum number that `nextInt(Random, int)` can return, `Integer.MAX_VALUE` if there is none

Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.