AdaptiveRange

constructor(environment: Environment<T, P>, radius: Double, desiredNeighbors: Int, tolerance: Int, minRange: Double = DEFAULT_MINRANGE, maxRange: Double = DEFAULT_MAXRANGE, adjustment: Double = DEFAULT_ADJUSTMENT)

Parameters

environment

the environment whose nodes this model links

radius

the initial range of every node

desiredNeighbors

the preferred number of neighbors

tolerance

if the number of neighbors is smaller than desiredNeighbors - tolerance, the range is increased; if it is higher than desiredNeighbors + tolerance, it is decreased

minRange

the minimum range

maxRange

the maximum range

adjustment

the amount the range is changed by when out of tolerance

Type Parameters

T

concentration type

P

position type