public class TwoDimensionalDoubleArray extends TwoDimensionalDoubleReadAccess.Base implements TwoDimensionalDoubleAccess
TwoDimensionalDoubleReadAccess.BaseEMPTY| Constructor and Description |
|---|
TwoDimensionalDoubleArray(int ySize,
double... values)
Constructor.
|
TwoDimensionalDoubleArray(int xSize,
int ySize)
Constructor.
|
TwoDimensionalDoubleArray(int xSize,
int ySize,
IntToDoubleFunction2 filler)
Initializing constructor.
|
TwoDimensionalDoubleArray(TwoDimensionalDoubleReadAccess array)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
TwoDimensionalDoubleArray |
copy()
Get a copy of this array.
|
double |
getValueAt(int ix,
int iy)
Get the value at the given indexes.
|
void |
invertX()
Invert the row order in X direction.
|
void |
invertY()
Invert the row order in Y direction.
|
void |
setValueAt(double value,
int ix,
int iy)
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
|
static TwoDimensionalDoubleArray |
unitySquare(int size)
Create a unity square 2-dimensional double array.
|
asBaseequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitchangeAllValues, changeValueAt, fillValuesByIndex, setElementAt, subAtX, subAtY, transposedasBase, getElementAt, singletonchangeAll, changeAll, createConstant, createIndexed, createNulled, createSupplied, empty, fillByIndex, setElement, zeroX, zeroYequal, getElement, getNumDimensions, getNumElements, getSize, getSizes, hash, toString, view, visitAll, visitAll, xIterable, xIterator, yIterable, yIteratorchange, setAll, setFrom, setFrom, setFromempty, linearizedpublic TwoDimensionalDoubleArray(int xSize,
int ySize)
0.0 values.xSize - X size of arrayySize - Y size of arrayTwoDimensionalDoubleArray(int, int, IntToDoubleFunction2)public TwoDimensionalDoubleArray(int xSize,
int ySize,
@NotNull
IntToDoubleFunction2 filler)
xSize - X size of arrayySize - Y size of arrayfiller - setter function which provides the value to set for each index combinationTwoDimensionalDoubleAccess.fillValuesByIndex(IntToDoubleFunction2)public TwoDimensionalDoubleArray(int ySize,
double... values)
ySize - size in y directionvalues - values in order, the first ySize values
will become row 0, the second ySize values
row 1, and so on. Needs a multiple of ySize values.public TwoDimensionalDoubleArray(@NotNull TwoDimensionalDoubleReadAccess array)
array - array to copypublic void setValueAt(double value,
int ix,
int iy)
setValueAt in interface TwoDimensionalDoubleAccessvalue - value to setix - X indexiy - Y indexpublic double getValueAt(int ix,
int iy)
getValueAt in interface TwoDimensionalDoubleReadAccessix - X indexiy - Y indexpublic int sizeX()
TwoDimensionalReadAccesssizeX in interface TwoDimensionalReadAccess<java.lang.Double>public int sizeY()
TwoDimensionalReadAccesssizeY in interface TwoDimensionalReadAccess<java.lang.Double>public void invertX()
public void invertY()
@NotNull public TwoDimensionalDoubleArray copy()
@NotNull public static TwoDimensionalDoubleArray unitySquare(int size)
x == y
diagonal initialized to 1.0.size - size of returned square array