R - the row-dimension of the matrixC - the column-dimension of the matrixpublic final class Mat<R extends OneMin,C extends OneMin> extends GeometrixObject
MatHelper| Modifier and Type | Class and Description |
|---|---|
static class |
Mat.ElementOrder |
| Modifier and Type | Method and Description |
|---|---|
static <R extends OneMin,C extends OneMin> |
create(R rowDim,
C columnDim,
Mat.ElementOrder order,
double... elements)
Constructs a matrix using elements from an array.
|
boolean |
equals(java.lang.Object o) |
static Mat<Four,Four> |
fourByFour(Mat.ElementOrder order,
double... elements)
Constructs a new four by four
Mat object. |
C |
getColumnDimension() |
double |
getElement(int row,
int column)
Gets the element of this matrix at a specified location.
|
R |
getRowDimension() |
int |
hashCode() |
static <D extends OneMin> |
identity(D dim)
Creates a new identity matrix with a specified dimension.
|
static Mat<One,One> |
oneByOne(Mat.ElementOrder order,
double element)
Constructs a new one by one
Mat object. |
boolean |
resembles(java.lang.Object o) |
static Mat<Three,Three> |
threeByThree(Mat.ElementOrder order,
double... elements)
Constructs a new three by three
Mat object. |
java.lang.String |
toString() |
static Mat<Two,Two> |
twoByTwo(Mat.ElementOrder order,
double... elements)
Constructs a new two by two
Mat object. |
static <R extends OneMin,C extends OneMin> |
zero(R rowDim,
C columnDim)
Constructs a new
Mat object which contains only zeros. |
public static <R extends OneMin,C extends OneMin> Mat<R,C> zero(R rowDim, C columnDim)
Mat object which contains only zeros.rowDim - the row-dimension of the matrixcolumnDim - the column-dimension of the matrixjava.lang.NullPointerException - if one argument is nullpublic static Mat<One,One> oneByOne(Mat.ElementOrder order, double element)
Mat object.element - the one and only elment of the matrixjava.lang.IllegalArgumentException - if element is equal to (+/-)Infinity or NaNpublic static Mat<Two,Two> twoByTwo(Mat.ElementOrder order, double... elements)
Mat object.elements - the elements of the matrix in row-major orderjava.lang.IllegalArgumentException - if the amount of elements is not 4java.lang.IllegalArgumentException - if one element is equal to (+/-)Infinity or NaNpublic static Mat<Three,Three> threeByThree(Mat.ElementOrder order, double... elements)
Mat object.elements - the elements of the matrix in row-major orderjava.lang.IllegalArgumentException - if the amount of elements is not 9java.lang.IllegalArgumentException - if one element is equal to (+/-)Infinity or NaNpublic static Mat<Four,Four> fourByFour(Mat.ElementOrder order, double... elements)
Mat object.elements - the elements of the matrix in row-major orderjava.lang.IllegalArgumentException - if the amount of elments is not 16java.lang.IllegalArgumentException - if one element is equal to (+/-)Infinity or NaNpublic static <D extends OneMin> Mat<D,D> identity(D dim)
dim - the row-dimension and column-dimension of the matrixjava.lang.NullPointerException - if dim is nullpublic static <R extends OneMin,C extends OneMin> Mat<R,C> create(R rowDim, C columnDim, Mat.ElementOrder order, double... elements)
rowDim - the row-dimension of the matrixcolumnDim - the column-dimension of the matrixorder - the order of the elements in the elements arrayelements - the elements of the matrixjava.lang.NullPointerException - if one parameter is nulljava.lang.IllegalArgumentException - if the specified dimensions and the amount of values doesn't matchjava.lang.IllegalArgumentException - if at least one value is equal either to (+/-)Infinity or NaNpublic double getElement(int row,
int column)
row - the row-location of the elementcolumn - the column-location of the element[row][column]java.lang.IllegalArgumentException - if row or column is out of boundspublic boolean resembles(java.lang.Object o)
resembles in class GeometrixObjectpublic boolean equals(java.lang.Object o)
equals in class GeometrixObjectpublic int hashCode()
hashCode in class GeometrixObjectpublic java.lang.String toString()
toString in class GeometrixObjectpublic R getRowDimension()
public C getColumnDimension()