-
- All Implemented Interfaces:
-
it.unibo.alchemist.loader.displacements.Displacement
,java.lang.Iterable
public final class GeometricGradientRectangle<P extends Position<out P>> extends Rectangle<P>
Distributes nodes geometrically within a rectangular shape.
-
-
Constructor Summary
Constructors Constructor Description GeometricGradientRectangle(Environment<out Object, P> env, RandomGenerator rng, int nodes, double x, double y, double sizex, double sizey, double lambda, int steps, boolean horizontal, boolean increasing)
Use this constructor to displace multiple groups of devices withexponentially varied density along an axis. GeometricGradientRectangle(Environment<out Object, P> env, RandomGenerator rng, int nodes, double x, double y, double sizex, double sizey, double lambda, boolean horizontal, boolean increasing)
Use this constructor to displace devices with an exponentially varieddensity along an axis.
-
Method Summary
Modifier and Type Method Description -
Methods inherited from class it.unibo.alchemist.loader.displacements.AbstractRandomDisplacement
getEnvironment, getNodeCount, getRandomGenerator, indexToPosition, makePosition, randomDouble, randomInt, stream
-
Methods inherited from class it.unibo.alchemist.loader.displacements.Displacement
iterator, stream
-
Methods inherited from class java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
GeometricGradientRectangle
GeometricGradientRectangle(Environment<out Object, P> env, RandomGenerator rng, int nodes, double x, double y, double sizex, double sizey, double lambda, int steps, boolean horizontal, boolean increasing)
Use this constructor to displace multiple groups of devices withexponentially varied density along an axis.- Parameters:
env
- Environmentrng
- RandomGeneratornodes
- the number of nodes to displacex
- start x positiony
- start y positionsizex
- widthsizey
- heightlambda
- the lambda parameter of the exponential.steps
- number of discrete groups.horizontal
- true if the exponential axis is horizontalincreasing
- true if device density should increase with the desired axis
-
GeometricGradientRectangle
GeometricGradientRectangle(Environment<out Object, P> env, RandomGenerator rng, int nodes, double x, double y, double sizex, double sizey, double lambda, boolean horizontal, boolean increasing)
Use this constructor to displace devices with an exponentially varieddensity along an axis.- Parameters:
env
- Environmentrng
- RandomGeneratornodes
- the number of nodes to displacex
- start x positiony
- start y positionsizex
- widthsizey
- heightlambda
- the lambda parameter of the exponential.horizontal
- true if the exponential axis is horizontalincreasing
- true if device density should increase with the desired axis
-
-
-
-