Class BlockDistributionNearbyRandom

    • Field Detail

      • sizeMinimum

        protected final int sizeMinimum
      • sizeMaximum

        protected final int sizeMaximum
      • sizeRatio

        protected final double sizeRatio
      • uniformDistributionProbability

        protected final double uniformDistributionProbability
    • Constructor Detail

      • BlockDistributionNearbyRandom

        public BlockDistributionNearbyRandom​(int sizeMinimum,
                                             int sizeMaximum,
                                             double sizeRatio,
                                             double uniformDistributionProbability)
    • Method Detail

      • nextInt

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