Package jadex.micro.mandelbrot.model
Class AreaData
java.lang.Object
jadex.micro.mandelbrot.model.AreaData
Struct for calculation of a specific mandelbrot cutout.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jadex.common.ClassInfo
The algorithm used to calculate the data.protected int
The chunk count, i.e.protected jadex.core.ComponentIdentifier
The calculator service provider id.protected short[][]
The result data.protected String
The display id.protected short
The max value where iteration is stopped.protected int
The retrycnt.protected int
The x size.protected int
The y size.protected int
The tasksize of a task (in pixel/points).protected double
The x end.protected int
The x offset.protected double
The x start.protected double
The y end.protected int
The y offset.protected double
The y start. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChunk
(PartDataChunk data) Add a chunk to a partprotected static short
bytesToshort
(byte[] buffer, int offset) Convert bytes to a short.static short[][]
byteToshort
(byte[] sdata) Set the data.short[][]
Get the data.Get the algorithm.jadex.common.ClassInfo
Get the algorithm.jadex.core.ComponentIdentifier
Get the calculator id.int
Get the chunk count.Get the data as a transferable string.Get the displayid.getId()
Value for identifying this area data.short
getMax()
Get the max value.int
int
getSizeX()
Get the sizex.int
getSizeY()
Get the sizey.int
Get the tasksize.double
getXEnd()
Get the xend.int
Get the x offset.double
Get the xstart.double
getYEnd()
Get the yend.int
Get the y offset.double
Get the ystart.setAlgorithmClass
(jadex.common.ClassInfo algorithm) Set the algorithm.setCalculatorId
(jadex.core.ComponentIdentifier cid) Set the calculator id.setChunkCount
(int chunkcount) Set the chunk count.setData
(short[][] data) Set the data.setDataString
(String sdata) Set the data.setDisplayId
(String displayid) Set the displayid.setMax
(short max) Set the max value.setRetryCount
(int retrycnt) setSizeX
(int sizex) Set the sizex.setSizeY
(int sizey) Set the sizey.setTaskSize
(int tasksize) Set the tasksize.setXEnd
(double xend) Set the xend.setXOffset
(int xoff) Set the x offset.setXStart
(double xstart) Set the xstart.setYEnd
(double yend) Set the yend.setYOffset
(int yoff) Set the y offset.setYStart
(double ystart) Set the ystart.static byte[]
shortToByte
(short[][] data) Get the data as a transferable string.protected static byte[]
shortToBytes
(short val, byte[] buffer, int offset) Convert a short to bytes.toString()
Get the string representation.
-
Field Details
-
xstart
protected double xstartThe x start. -
xend
protected double xendThe x end. -
ystart
protected double ystartThe y start. -
yend
protected double yendThe y end. -
xoff
protected int xoffThe x offset. -
yoff
protected int yoffThe y offset. -
sizex
protected int sizexThe x size. -
sizey
protected int sizeyThe y size. -
max
protected short maxThe max value where iteration is stopped. -
cid
protected jadex.core.ComponentIdentifier cidThe calculator service provider id. -
tasksize
protected int tasksizeThe tasksize of a task (in pixel/points). -
algorithm
protected jadex.common.ClassInfo algorithmThe algorithm used to calculate the data. -
data
protected short[][] dataThe result data. -
displayid
The display id. -
chunkcount
protected int chunkcountThe chunk count, i.e. how many intermediate results per part. -
retrycnt
protected int retrycntThe 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
Set the xstart.- Parameters:
xstart
- The xstart to set.
-
getXEnd
public double getXEnd()Get the xend.- Returns:
- the xend.
-
setXEnd
Set the xend.- Parameters:
xend
- The xend to set.
-
getYStart
public double getYStart()Get the ystart.- Returns:
- the ystart.
-
setYStart
Set the ystart.- Parameters:
ystart
- The ystart to set.
-
getYEnd
public double getYEnd()Get the yend.- Returns:
- the yend.
-
setYEnd
Set the yend.- Parameters:
yend
- The yend to set.
-
getXOffset
public int getXOffset()Get the x offset.- Returns:
- the x offset.
-
setXOffset
Set the x offset.- Parameters:
xoff
- The x offset to set.
-
getYOffset
public int getYOffset()Get the y offset.- Returns:
- the y offset.
-
setYOffset
Set the y offset.- Parameters:
yoff
- The y offset to set.
-
getSizeX
public int getSizeX()Get the sizex.- Returns:
- the sizex.
-
setSizeX
Set the sizex.- Parameters:
sizex
- The sizex to set.
-
getSizeY
public int getSizeY()Get the sizey.- Returns:
- the sizey.
-
setSizeY
Set the sizey.- Parameters:
sizey
- The sizey to set.
-
getMax
public short getMax()Get the max value.- Returns:
- the max value.
-
setMax
Set the max value.- Parameters:
max
- The max value to set.
-
fetchData
public short[][] fetchData()Get the data.- Returns:
- the data.
-
setData
Set the data.- Parameters:
data
- The data to set.
-
getDataString
Get the data as a transferable string.- Returns:
- the data string.
-
setDataString
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
Set the calculator id.- Parameters:
id
- The calculator id to set.
-
getTaskSize
public int getTaskSize()Get the tasksize.- Returns:
- the tasksize.
-
setTaskSize
Set the tasksize.- Parameters:
tasksize
- The tasksize to set.
-
getAlgorithmClass
public jadex.common.ClassInfo getAlgorithmClass()Get the algorithm.- Returns:
- the algorithm.
-
setAlgorithmClass
Set the algorithm.- Parameters:
algorithm
- The algorithm to set.
-
getAlgorithm
Get the algorithm.- Returns:
- the algorithm.
-
addChunk
Add a chunk to a part -
toString
Get the string representation. / public String toString() { return "AreaData(x="+xoff+", y="+yoff+" xstart="+xstart+" ystart="+ystart+")"; } -
getDisplayId
Get the displayid.- Returns:
- the displayid.
-
setDisplayId
Set the displayid.- Parameters:
displayid
- The displayid to set.
-
getChunkCount
public int getChunkCount()Get the chunk count.- Returns:
- The chunk count
-
setChunkCount
Set the chunk count.- Parameters:
chunkcount
- The chunk count to set
-
getId
Value for identifying this area data. -
getRetryCount
public int getRetryCount()- Returns:
- the retrycnt
-
setRetryCount
- Parameters:
retrycnt
- the retrycnt to set
-