Class BetaDistributionNearbyRandom

java.lang.Object
org.optaplanner.core.impl.heuristic.selector.common.nearby.BetaDistributionNearbyRandom
All Implemented Interfaces:
NearbyRandom

public final class BetaDistributionNearbyRandom extends Object implements NearbyRandom
  • Constructor Details

    • BetaDistributionNearbyRandom

      public BetaDistributionNearbyRandom(double betaDistributionAlpha, double betaDistributionBeta)
  • Method Details

    • nextInt

      public int nextInt(Random random, int nearbySize)
      Specified by:
      nextInt in interface NearbyRandom
      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

      public int getOverallSizeMaximum()
      Description copied from interface: NearbyRandom
      Used to limit the RAM memory size of the nearby distance matrix.
      Specified by:
      getOverallSizeMaximum in interface NearbyRandom
      Returns:
      one more than the maximum number that NearbyRandom.nextInt(Random, int) can return, Integer.MAX_VALUE if there is none
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object