Class BetaDistributionNearbyRandom
- java.lang.Object
-
- org.optaplanner.core.impl.heuristic.selector.common.nearby.BetaDistributionNearbyRandom
-
- All Implemented Interfaces:
NearbyRandom
public class BetaDistributionNearbyRandom extends Object implements NearbyRandom
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.math3.distribution.BetaDistributionbetaDistribution
-
Constructor Summary
Constructors Constructor Description BetaDistributionNearbyRandom(double betaDistributionAlpha, double betaDistributionBeta)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOverallSizeMaximum()Used to limit the RAM memory size of the nearby distance matrix.intnextInt(Random random, int nearbySize)
-
-
-
Method Detail
-
nextInt
public int nextInt(Random random, int nearbySize)
- Specified by:
nextIntin interfaceNearbyRandom- Parameters:
random- never nullnearbySize- 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:NearbyRandomUsed to limit the RAM memory size of the nearby distance matrix.- Specified by:
getOverallSizeMaximumin interfaceNearbyRandom- Returns:
- one more than the maximum number that
NearbyRandom.nextInt(Random, int)can return,Integer.MAX_VALUEif there is none
-
-