Package 

Class DrawLayersIsolines

  • All Implemented Interfaces:
    it.unibo.alchemist.boundary.swingui.effect.api.DrawLayers , it.unibo.alchemist.boundary.swingui.effect.api.Effect , it.unibo.alchemist.boundary.swingui.effect.api.FunctionDrawer , java.io.Serializable

    
    public abstract class DrawLayersIsolines
    extends DrawLayersValues
                        

    Draw layers isolines. The user must specify: - the number of isolines to draw - the min layer value - the max layer value - the distribution, used to space isoline values between min and max This class defines the drawFunction method, which is capable of drawing a layer's isolines given a function. The only responsibility left to subclasses is to provide a LayerToFunctionMapper.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum DrawLayersIsolines.Distribution

      Distributions describing how values within an interval should be spaced.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      DrawLayersIsolines.Distribution getDistribution()
      void setDistribution(DrawLayersIsolines.Distribution distribution)
      void setDrawValues(Boolean drawValues)
      <T, P extends Position2D<P>> void drawFunction(Function<out Object, out Number> function, Environment<T, P> environment, Graphics2D graphics, Wormhole2D<P> wormhole)
      RangedInteger getNumberOfIsolines()
      void setNumberOfIsolines(RangedInteger nOfIsolines)
      static Array<double> logspace(double d1, double d2, int n, double base) generates n logarithmically-spaced points between d1 and d2 using the provided base.
      static Array<double> linspace(double d1, double d2, int n) generates n linearly-spaced points between d1 and d2.
      • Methods inherited from class it.unibo.alchemist.boundary.swingui.effect.impl.DrawLayersValues

        drawLayers, getMaxLayerValue, getMinLayerValue, setMaxLayerValue, setMinLayerValue
      • Methods inherited from class it.unibo.alchemist.boundary.swingui.effect.impl.AbstractDrawLayers

        drawLayers, getAlpha, getBlue, getColorSummary, getGreen, getMolString, getRed, isLayerFilter, setAlpha, setBlue, setGreen, setLayerFilter, setMolString, setRed
      • Methods inherited from class it.unibo.alchemist.boundary.swingui.effect.impl.AbstractDrawOnce

        apply, getMarkerNodeID
      • Methods inherited from class it.unibo.alchemist.boundary.swingui.effect.api.Effect

        apply, apply, equals, hashCode
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DrawLayersIsolines

        DrawLayersIsolines(IsolinesFinder algorithm, LayerToFunctionMapper mapper)
        Every class extending this one should call this constructor.
        Parameters:
        algorithm - - the algorithm used to extract isolines
        mapper - - the function converting a layer to a function