Grid
open class Grid<P : Position<P>> @JvmOverloads constructor(environment: Environment<*, P>, randomGenerator: RandomGenerator, xStart: Double, yStart: Double, xEnd: Double, yEnd: Double, xStep: Double, yStep: Double, xRand: Double = 0.0, yRand: Double = 0.0, xShift: Double = 0.0, yShift: Double = 0.0) : Deployment<P>
A (possibly randomized) grid of nodes.
Parameters
environment
the {@link Environment}Content copied to clipboard
randomGenerator
the {@link RandomGenerator}Content copied to clipboard
xStart
the start x positionContent copied to clipboard
yStart
the start y positionContent copied to clipboard
xEnd
the end x positionContent copied to clipboard
yEnd
the end y positionContent copied to clipboard
xStep
how distant on the x axis (on average) nodes should beContent copied to clipboard
yStep
how distant on the y axis (on average) nodes should beContent copied to clipboard
xRand
how randomized should be positions along the x axisContent copied to clipboard
yRand
how randomized should be positions along the y axisContent copied to clipboard
xShift
how shifted should be positions between linesContent copied to clipboard
yShift
how shifted should be positions along columnsContent copied to clipboard
Constructors
Functions
Link copied to clipboard
Returns the optional NetworkModel associated to the deployment, or null if there is none.
Link copied to clipboard
Returns a random element of the Iterable using the provided randomGenerator.
Link copied to clipboard
Fisher–Yates shuffle algorithm using a RandomGenerator. More information on Wikipedia.