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

## org.optaplanner.core.impl.heuristic.selector.common.nearby
Class LinearDistributionNearbyRandom

    java.lang.Object
      org.optaplanner.core.impl.heuristic.selector.common.nearby.LinearDistributionNearbyRandom

All Implemented Interfaces:
  NearbyRandom

    public class LinearDistributionNearbyRandom

extends Object
implements NearbyRandom

P(x) = 2/m - 2x/m² Cumulative probability F(x) = x(2m - x)/m² Inverse cumulative probability F(p) = m(1 - (1 - p)^(1/2))

Field Summary
`protected int` | `sizeMaximum`

Constructor Summary
`LinearDistributionNearbyRandom(int sizeMaximum)`

Method Summary
`int` | `nextInt(Random random, int n)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sizeMaximum

    protected final int sizeMaximum

Constructor Detail

### LinearDistributionNearbyRandom

    public LinearDistributionNearbyRandom(int sizeMaximum)

Method Detail

### nextInt

    public int nextInt(Random random,
                       int n)

  Specified by:
    `nextInt` in interface `NearbyRandom`

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

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