Class AreaData

java.lang.Object
jadex.micro.mandelbrot.model.AreaData

public class AreaData extends Object
Struct for calculation of a specific mandelbrot cutout.
  • Field Details

    • xstart

      protected double xstart
      The x start.
    • xend

      protected double xend
      The x end.
    • ystart

      protected double ystart
      The y start.
    • yend

      protected double yend
      The y end.
    • xoff

      protected int xoff
      The x offset.
    • yoff

      protected int yoff
      The y offset.
    • sizex

      protected int sizex
      The x size.
    • sizey

      protected int sizey
      The y size.
    • max

      protected short max
      The max value where iteration is stopped.
    • cid

      protected jadex.core.ComponentIdentifier cid
      The calculator service provider id.
    • tasksize

      protected int tasksize
      The tasksize of a task (in pixel/points).
    • algorithm

      protected jadex.common.ClassInfo algorithm
      The algorithm used to calculate the data.
    • data

      protected short[][] data
      The result data.
    • displayid

      protected String displayid
      The display id.
    • chunkcount

      protected int chunkcount
      The chunk count, i.e. how many intermediate results per part.
    • retrycnt

      protected int retrycnt
      The retrycnt.
  • Constructor Details

    • AreaData

      public AreaData()
      Create an empty area data.
    • AreaData

      public AreaData(double xstart, double xend, double ystart, double yend, int sizex, int sizey)
      Create a new area data.
  • Method Details

    • getXStart

      public double getXStart()
      Get the xstart.
      Returns:
      the xstart.
    • setXStart

      public AreaData setXStart(double xstart)
      Set the xstart.
      Parameters:
      xstart - The xstart to set.
    • getXEnd

      public double getXEnd()
      Get the xend.
      Returns:
      the xend.
    • setXEnd

      public AreaData setXEnd(double xend)
      Set the xend.
      Parameters:
      xend - The xend to set.
    • getYStart

      public double getYStart()
      Get the ystart.
      Returns:
      the ystart.
    • setYStart

      public AreaData setYStart(double ystart)
      Set the ystart.
      Parameters:
      ystart - The ystart to set.
    • getYEnd

      public double getYEnd()
      Get the yend.
      Returns:
      the yend.
    • setYEnd

      public AreaData setYEnd(double yend)
      Set the yend.
      Parameters:
      yend - The yend to set.
    • getXOffset

      public int getXOffset()
      Get the x offset.
      Returns:
      the x offset.
    • setXOffset

      public AreaData setXOffset(int xoff)
      Set the x offset.
      Parameters:
      xoff - The x offset to set.
    • getYOffset

      public int getYOffset()
      Get the y offset.
      Returns:
      the y offset.
    • setYOffset

      public AreaData setYOffset(int yoff)
      Set the y offset.
      Parameters:
      yoff - The y offset to set.
    • getSizeX

      public int getSizeX()
      Get the sizex.
      Returns:
      the sizex.
    • setSizeX

      public AreaData setSizeX(int sizex)
      Set the sizex.
      Parameters:
      sizex - The sizex to set.
    • getSizeY

      public int getSizeY()
      Get the sizey.
      Returns:
      the sizey.
    • setSizeY

      public AreaData setSizeY(int sizey)
      Set the sizey.
      Parameters:
      sizey - The sizey to set.
    • getMax

      public short getMax()
      Get the max value.
      Returns:
      the max value.
    • setMax

      public AreaData setMax(short max)
      Set the max value.
      Parameters:
      max - The max value to set.
    • fetchData

      public short[][] fetchData()
      Get the data.
      Returns:
      the data.
    • setData

      public AreaData setData(short[][] data)
      Set the data.
      Parameters:
      data - The data to set.
    • getDataString

      public String getDataString()
      Get the data as a transferable string.
      Returns:
      the data string.
    • setDataString

      public AreaData setDataString(String sdata)
      Set the data.
      Parameters:
      data - The data to set.
    • byteToshort

      public static short[][] byteToshort(byte[] sdata)
      Set the data.
      Parameters:
      data - The data to set.
    • bytesToshort

      protected static short bytesToshort(byte[] buffer, int offset)
      Convert bytes to a short.
    • shortToByte

      public static byte[] shortToByte(short[][] data)
      Get the data as a transferable string.
      Returns:
      the data string.
    • shortToBytes

      protected static byte[] shortToBytes(short val, byte[] buffer, int offset)
      Convert a short to bytes.
    • getCalculatorId

      public jadex.core.ComponentIdentifier getCalculatorId()
      Get the calculator id.
      Returns:
      the calculator id.
    • setCalculatorId

      public AreaData setCalculatorId(jadex.core.ComponentIdentifier cid)
      Set the calculator id.
      Parameters:
      id - The calculator id to set.
    • getTaskSize

      public int getTaskSize()
      Get the tasksize.
      Returns:
      the tasksize.
    • setTaskSize

      public AreaData setTaskSize(int tasksize)
      Set the tasksize.
      Parameters:
      tasksize - The tasksize to set.
    • getAlgorithmClass

      public jadex.common.ClassInfo getAlgorithmClass()
      Get the algorithm.
      Returns:
      the algorithm.
    • setAlgorithmClass

      public AreaData setAlgorithmClass(jadex.common.ClassInfo algorithm)
      Set the algorithm.
      Parameters:
      algorithm - The algorithm to set.
    • getAlgorithm

      public IFractalAlgorithm getAlgorithm(ClassLoader cl)
      Get the algorithm.
      Returns:
      the algorithm.
    • addChunk

      public void addChunk(PartDataChunk data)
      Add a chunk to a part
    • toString

      public String toString()
      Get the string representation. / public String toString() { return "AreaData(x="+xoff+", y="+yoff+" xstart="+xstart+" ystart="+ystart+")"; }
      Overrides:
      toString in class Object
    • getDisplayId

      public String getDisplayId()
      Get the displayid.
      Returns:
      the displayid.
    • setDisplayId

      public AreaData setDisplayId(String displayid)
      Set the displayid.
      Parameters:
      displayid - The displayid to set.
    • getChunkCount

      public int getChunkCount()
      Get the chunk count.
      Returns:
      The chunk count
    • setChunkCount

      public AreaData setChunkCount(int chunkcount)
      Set the chunk count.
      Parameters:
      chunkcount - The chunk count to set
    • getId

      public Object getId()
      Value for identifying this area data.
    • getRetryCount

      public int getRetryCount()
      Returns:
      the retrycnt
    • setRetryCount

      public AreaData setRetryCount(int retrycnt)
      Parameters:
      retrycnt - the retrycnt to set