Class CircularArc
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Deployment
,kotlin.collections.Iterable
,kotlin.collections.MutableIterable
public final class CircularArc<P extends Position2D<P>> implements Deployment<P>
Displaces the nodes in the environment in a circular arc, given a nodeCount, the coordinates of the circle's center centerX and centerY, the circle's radius radius, perturbation randomness (uniform, generated via randomGenerator) for radius radiusRandomness and for angle angleRandomness, a startAngle, and an endAngle.
Default values generate a uniform deployment on a circumference.
-
-
Field Summary
Fields Modifier and Type Field Description private final Environment<?, P>
environment
private final RandomGenerator
randomGenerator
private final Integer
nodeCount
private final Double
centerX
private final Double
centerY
private final Double
radius
private final Double
radiusRandomness
private final Double
angleRandomness
private final Double
startAngle
private final Double
endAngle
-
Constructor Summary
Constructors Constructor Description CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius, Double radiusRandomness, Double angleRandomness, Double startAngle, Double endAngle)
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius, Double radiusRandomness, Double angleRandomness, Double startAngle)
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius, Double radiusRandomness, Double angleRandomness)
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius, Double radiusRandomness)
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius)
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY)
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX)
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount)
-
Method Summary
Modifier and Type Method Description final Environment<?, P>
getEnvironment()
final RandomGenerator
getRandomGenerator()
final Integer
getNodeCount()
final Double
getCenterX()
final Double
getCenterY()
final Double
getRadius()
final Double
getRadiusRandomness()
final Double
getAngleRandomness()
final Double
getStartAngle()
final Double
getEndAngle()
Stream<P>
stream()
-
Methods inherited from class it.unibo.alchemist.model.Deployment
getAssociatedLinkingRule, iterator
-
Methods inherited from class kotlin.collections.Iterable
forEach, spliterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CircularArc
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius, Double radiusRandomness, Double angleRandomness, Double startAngle, Double endAngle)
-
CircularArc
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius, Double radiusRandomness, Double angleRandomness, Double startAngle)
-
CircularArc
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius, Double radiusRandomness, Double angleRandomness)
-
CircularArc
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius, Double radiusRandomness)
-
CircularArc
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY, Double radius)
-
CircularArc
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX, Double centerY)
-
CircularArc
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount, Double centerX)
-
CircularArc
CircularArc(Environment<?, P> environment, RandomGenerator randomGenerator, Integer nodeCount)
-
-
Method Detail
-
getEnvironment
final Environment<?, P> getEnvironment()
-
getRandomGenerator
final RandomGenerator getRandomGenerator()
-
getNodeCount
final Integer getNodeCount()
-
getCenterX
final Double getCenterX()
-
getCenterY
final Double getCenterY()
-
getRadiusRandomness
final Double getRadiusRandomness()
-
getAngleRandomness
final Double getAngleRandomness()
-
getStartAngle
final Double getStartAngle()
-
getEndAngle
final Double getEndAngle()
-
stream
Stream<P> stream()
- Returns:
a Stream over the positions of this Deployment
-
-
-
-