public class ThreeDimensionalIntArray extends java.lang.Object implements ThreeDimensionalIntAccess
EMPTY
Constructor and Description |
---|
ThreeDimensionalIntArray(int ySize,
int zSize,
int... values)
Constructor.
|
ThreeDimensionalIntArray(int xSize,
int ySize,
int zSize)
Constructor.
|
ThreeDimensionalIntArray(int xSize,
int ySize,
int zSize,
IntToIntFunction3 filler)
Initializing constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getValueAt(int ix,
int iy,
int iz)
Get the value at the given indexes.
|
void |
setValueAt(int value,
int ix,
int iy,
int iz)
Set the value at the given indexes.
|
int |
sizeX()
Get the number of elements in X direction.
|
int |
sizeY()
Get the number of elements in Y direction
|
int |
sizeZ()
Get the number of elements in Z direction
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeAllValues, changeValueAt, fillValuesByIndex, setElementAt, subAtX, subAtY, subAtZ
getElementAt, singleton
changeAll, changeAll, empty, fillByIndex, setElement
getElement, getNumDimensions, getNumElements, getSize, getSizes, view, visitAll, visitAll
change, setAll, setFrom, setFrom, setFrom
empty, linearized
public ThreeDimensionalIntArray(int xSize, int ySize, int zSize)
0
values.xSize
- X size of arrayySize
- Y size of arrayzSize
- Z size of arrayThreeDimensionalIntArray(int, int, int, IntToIntFunction3)
public ThreeDimensionalIntArray(int xSize, int ySize, int zSize, @NotNull IntToIntFunction3 filler)
xSize
- X size of arrayySize
- Y size of arrayzSize
- Z size of arrayfiller
- setter function which provides the value to set for each index combinationThreeDimensionalIntAccess.fillValuesByIndex(de.caff.generics.function.IntToIntFunction3)
public ThreeDimensionalIntArray(int ySize, int zSize, int... values)
ySize
- size in y directionzSize
- size in z directionvalues
- values in order, the first zSize
values
will become row 0 of plane 0, the second zSize
values
row 1, and so on until the first plane of ySize
rows is filled.
Then the next plane is filled.
Needs a multiple of ySize*zSize
values, and the multiplicator
defines the X size.public void setValueAt(int value, int ix, int iy, int iz)
ThreeDimensionalIntAccess
setValueAt
in interface ThreeDimensionalIntAccess
value
- value to setix
- X indexiy
- Y indexiz
- Z indexpublic int getValueAt(int ix, int iy, int iz)
ThreeDimensionalIntReadAccess
getValueAt
in interface ThreeDimensionalIntReadAccess
ix
- X indexiy
- Y indexiz
- Z indexpublic int sizeX()
ThreeDimensionalReadAccess
sizeX
in interface ThreeDimensionalReadAccess<java.lang.Integer>
public int sizeY()
ThreeDimensionalReadAccess
sizeY
in interface ThreeDimensionalReadAccess<java.lang.Integer>
public int sizeZ()
ThreeDimensionalReadAccess
sizeZ
in interface ThreeDimensionalReadAccess<java.lang.Integer>