Package one.microstream.math
Class Matrix<T>
java.lang.Object
one.microstream.math.Matrix<T>
public class Matrix<T> extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Matrix.IterationMode
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description T
getElementAt(int rowIndex, int colIndex)
Class<T>
getType()
Iterable<T>
iterate()
Iterable<T>
iterate(int centerRowIndex, int centerColumnIndex, double range)
Iterable<T>
iterate(int centerRowIndex, int centerColumnIndex, int squareRadius)
Iterable<T>
iterate(int firstRow, int firstColumn, int lastRow, int lastColumn)
T
setElementAt(int rowIndex, int colIndex, T newElement)
void
swapElements(int rowIndex1, int colIndex1, int rowIndex2, int colIndex2)
String
toString()
static <T> T[][]
validateArray(T[][] array)
Validates ifarray
is a well-formed array in terms of a matrix.
-
Constructor Details
-
Method Details
-
validateArray
Validates ifarray
is a well-formed array in terms of a matrix.Well-formed arrays meet the following criteria:
- Both dimensions have a size greater than 0.
- No nested array may be null.
- All nested arrays have the same size.- Type Parameters:
T
-- Parameters:
array
-- Throws:
MatrixException
NullPointerException
-
getType
-
toString
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
getElementAt
- Parameters:
rowIndex
-colIndex
-
-
setElementAt
- Parameters:
rowIndex
-colIndex
-newElement
-- Returns:
- the old element at position (rowIndex, colIndex)
-
swapElements
public void swapElements(int rowIndex1, int colIndex1, int rowIndex2, int colIndex2)- Parameters:
rowIndex1
-colIndex1
-rowIndex2
-colIndex2
-
-
iterate
-
iterate
public Iterable<T> iterate(int firstRow, int firstColumn, int lastRow, int lastColumn) throws IllegalArgumentException- Parameters:
firstRow
-firstColumn
-lastRow
-lastColumn
-- Throws:
IllegalArgumentException
-
iterate
public Iterable<T> iterate(int centerRowIndex, int centerColumnIndex, int squareRadius) throws IllegalArgumentException- Throws:
IllegalArgumentException
-
iterate
public Iterable<T> iterate(int centerRowIndex, int centerColumnIndex, double range) throws IllegalArgumentException- Throws:
IllegalArgumentException
-