public final class MatrixHeapArrayM2x2D extends Object implements Matrix2x2DType
The default implementation of the Matrix2x2DType interface.
This implementation stores values in a plain on-heap array.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
double |
getR0C0D() |
double |
getR0C1D() |
double |
getR1C0D() |
double |
getR1C1D() |
<V extends VectorWritable2DType> |
getRow2D(int row,
V out)
Retrieve row
row, saving the result to out. |
<V extends VectorWritable2DType> |
getRow2DUnsafe(int row,
V out)
Retrieve row
row, saving the result to out. |
double |
getRowColumnD(int row,
int column) |
int |
hashCode() |
static Matrix2x2DType |
newMatrix() |
static Matrix2x2DType |
newMatrixFrom(MatrixReadable2x2DType m) |
void |
setR0C0D(double x)
Set row 0, column 0 of the matrix to
x. |
void |
setR0C1D(double x)
Set row 0, column 1 of the matrix to
x. |
void |
setR1C0D(double x)
Set row 1, column 0 of the matrix to
x. |
void |
setR1C1D(double x)
Set row 1, column 1 of the matrix to
x. |
void |
setRowColumnD(int row,
int column,
double value)
Set the value from the matrix at row
row, column column to
value. |
void |
setRowWith2D(int row,
VectorReadable2DType v)
Set row
row of the matrix to v. |
void |
setRowWith2DUnsafe(int row,
VectorReadable2DType v)
Set row
row of the matrix to v. |
String |
toString() |
public static Matrix2x2DType newMatrix()
public static Matrix2x2DType newMatrixFrom(MatrixReadable2x2DType m)
m - The source matrixpublic double getRowColumnD(int row,
int column)
getRowColumnD in interface MatrixReadableDTyperow - The rowcolumn - The columnrow , column column.public void setRowColumnD(int row,
int column,
double value)
MatrixWritableDTyperow, column column to
value.setRowColumnD in interface MatrixWritableDTyperow - The rowcolumn - The columnvalue - The valuepublic <V extends VectorWritable2DType> void getRow2D(int row, V out)
MatrixReadable2x2DTyperow, saving the result to out.getRow2D in interface MatrixReadable2x2DTypeV - The precise type of writable vector.row - The index of the row, starting at 0.out - The output vector.public <V extends VectorWritable2DType> void getRow2DUnsafe(int row, V out)
MatrixReadable2x2DTyperow, saving the result to out. No bounds
checking is performed for row, and out-of-bounds values result in
undefined behaviour.getRow2DUnsafe in interface MatrixReadable2x2DTypeV - The precise type of writable vector.row - The index of the row, starting at 0.out - The output vector.public double getR0C0D()
getR0C0D in interface MatrixReadable2x2DTypepublic void setR0C0D(double x)
MatrixWritable2x2DTypex.setR0C0D in interface MatrixWritable2x2DTypex - The valuepublic void setRowWith2D(int row,
VectorReadable2DType v)
MatrixWritable2x2DTyperow of the matrix to v.setRowWith2D in interface MatrixWritable2x2DTyperow - The row indexv - The row vectorpublic void setRowWith2DUnsafe(int row,
VectorReadable2DType v)
MatrixWritable2x2DTyperow of the matrix to v. No bounds checking is
performed for row, and out-of-bounds values result in undefined
behaviour.setRowWith2DUnsafe in interface MatrixWritable2x2DTyperow - The row indexv - The row vectorpublic double getR1C0D()
getR1C0D in interface MatrixReadable2x2DTypepublic void setR1C0D(double x)
MatrixWritable2x2DTypex.setR1C0D in interface MatrixWritable2x2DTypex - The valuepublic double getR0C1D()
getR0C1D in interface MatrixReadable2x2DTypepublic void setR0C1D(double x)
MatrixWritable2x2DTypex.setR0C1D in interface MatrixWritable2x2DTypex - The valuepublic double getR1C1D()
getR1C1D in interface MatrixReadable2x2DTypepublic void setR1C1D(double x)
MatrixWritable2x2DTypex.setR1C1D in interface MatrixWritable2x2DTypex - The valueCopyright © 2017 <code@io7m.com> http://io7m.com