Class Grid

  • All Implemented Interfaces:
    it.unibo.alchemist.model.Deployment , kotlin.collections.Iterable , kotlin.collections.MutableIterable

    
    public class Grid
     implements Deployment<Position<?>>
                        

    A (possibly randomized) grid of nodes.

    • Constructor Detail

      • Grid

        Grid(Environment<?, ?> environment, RandomGenerator randomGenerator, Double xStart, Double yStart, Double xEnd, Double yEnd, Double xStep, Double yStep, Double xRand, Double yRand, Double xShift, Double yShift)
        Parameters:
        environment -
        the {@link Environment}
        randomGenerator -
        the {@link RandomGenerator}
        xStart -
        the start x position
        yStart -
        the start y position
        xEnd -
        the end x position
        yEnd -
        the end y position
        xStep -
        how distant on the x axis (on average) nodes should be
        yStep -
        how distant on the y axis (on average) nodes should be
        xRand -
        how randomized should be positions along the x axis
        yRand -
        how randomized should be positions along the y axis
        xShift -
        how shifted should be positions between lines
        yShift -
        how shifted should be positions along columns
      • Grid

        Grid(Environment<?, ?> environment, RandomGenerator randomGenerator, Double xStart, Double yStart, Double xEnd, Double yEnd, Double xStep, Double yStep, Double xRand, Double yRand, Double xShift)
        Parameters:
        environment -
        the {@link Environment}
        randomGenerator -
        the {@link RandomGenerator}
        xStart -
        the start x position
        yStart -
        the start y position
        xEnd -
        the end x position
        yEnd -
        the end y position
        xStep -
        how distant on the x axis (on average) nodes should be
        yStep -
        how distant on the y axis (on average) nodes should be
        xRand -
        how randomized should be positions along the x axis
        yRand -
        how randomized should be positions along the y axis
        xShift -
        how shifted should be positions between lines
      • Grid

        Grid(Environment<?, ?> environment, RandomGenerator randomGenerator, Double xStart, Double yStart, Double xEnd, Double yEnd, Double xStep, Double yStep, Double xRand, Double yRand)
        Parameters:
        environment -
        the {@link Environment}
        randomGenerator -
        the {@link RandomGenerator}
        xStart -
        the start x position
        yStart -
        the start y position
        xEnd -
        the end x position
        yEnd -
        the end y position
        xStep -
        how distant on the x axis (on average) nodes should be
        yStep -
        how distant on the y axis (on average) nodes should be
        xRand -
        how randomized should be positions along the x axis
        yRand -
        how randomized should be positions along the y axis
      • Grid

        Grid(Environment<?, ?> environment, RandomGenerator randomGenerator, Double xStart, Double yStart, Double xEnd, Double yEnd, Double xStep, Double yStep, Double xRand)
        Parameters:
        environment -
        the {@link Environment}
        randomGenerator -
        the {@link RandomGenerator}
        xStart -
        the start x position
        yStart -
        the start y position
        xEnd -
        the end x position
        yEnd -
        the end y position
        xStep -
        how distant on the x axis (on average) nodes should be
        yStep -
        how distant on the y axis (on average) nodes should be
        xRand -
        how randomized should be positions along the x axis
      • Grid

        Grid(Environment<?, ?> environment, RandomGenerator randomGenerator, Double xStart, Double yStart, Double xEnd, Double yEnd, Double xStep, Double yStep)
        Parameters:
        environment -
        the {@link Environment}
        randomGenerator -
        the {@link RandomGenerator}
        xStart -
        the start x position
        yStart -
        the start y position
        xEnd -
        the end x position
        yEnd -
        the end y position
        xStep -
        how distant on the x axis (on average) nodes should be
        yStep -
        how distant on the y axis (on average) nodes should be