FieldElement[][] array to store entries.
As specified in the FieldMatrix interface, matrix element indexing
is 0-based -- e.g., getEntry(0, 0)
returns the element in the first row, first column of the matrix.
| Modifier and Type | Field and Description |
|---|---|
| private T[][] | data
Entries of the matrix |
| private static final long | serialVersionUID
Serializable version identifier |
| Access | Constructor and Description |
|---|---|
| public | Array2DRowFieldMatrix(final Field<T>
field to which the elements belong field)Creates a matrix with no data |
| public | Array2DRowFieldMatrix(final Field<T>
Field to which the elements belong. field, final int Number of rows in the new matrix. rowDimension, final int Number of columns in the new matrix. columnDimension)Create a new |
| public | Array2DRowFieldMatrix(final T[][]
Data for the new matrix. d)Create a new |
| public | Array2DRowFieldMatrix(final Field<T>
Field to which the elements belong. field, final T[][] Data for the new matrix. d)Create a new |
| public | Array2DRowFieldMatrix(final T[][]
Data for the new matrix. d, final boolean Whether to copy or reference the input array. copyArray)Create a new |
| public | Array2DRowFieldMatrix(final Field<T>
Field to which the elements belong. field, final T[][] Data for the new matrix. d, final boolean Whether to copy or reference the input array. copyArray)Create a new |
| public | Array2DRowFieldMatrix(final T[]
Column vector holding data for new matrix. v)Create a new (column) |
| public | Array2DRowFieldMatrix(final Field<T>
Field to which the elements belong. field, final T[] Column vector holding data for new matrix. v)Create a new (column) |
| Modifier and Type | Method and Description |
|---|---|
| public Array2DRowFieldMatrix | |
| public void | addToEntry(final int
Row location of entry to be set. row, final int Column location of entry to be set. column, final T Value to add to the current matrix entry in
increment)(row, column).Implements abstract org. Implements org. Change an entry in the specified row and column. |
| public FieldMatrix | copy()
Implements abstract org. Implements org. Make a (deep) copy of this. |
| private void | |
| private T[][] | Returns: a copy of the underlying data array.Get a fresh copy of the underlying data array. |
| public FieldMatrix | createMatrix(final int
the number of rows in the new matrix rowDimension, final int the number of columns in the new matrix columnDimension)Implements abstract org. Implements org. Create a new FieldMatrix<t> of the same type as the instance with the supplied row and column dimensions. |
| public int | getColumnDimension()
Implements abstract org. Implements org. Returns the number of columns in the matrix. |
| public T[][] | getData()
Overrides org. Implements org. Returns matrix entries as a two-dimensional array. |
| public T[][] | Returns: the 2-dimensional array of entries.Get a reference to the underlying data array. |
| public T | getEntry(final int
row location of entry to be fetched row, final int column location of entry to be fetched column)Implements abstract org. Implements org. Returns the entry in the specified row and column. |
| public int | getRowDimension()
Implements abstract org. Implements org. Returns the number of rows in the matrix. |
| public Array2DRowFieldMatrix | Returns: this * m.Matrix to postmultiply by. m)Postmultiplying this matrix by |
| public void | multiplyEntry(final int
Row location of entry to be set. row, final int Column location of entry to be set. column, final T Multiplication factor for the current matrix entry
in factor)(row,column)Implements abstract org. Implements org. Change an entry in the specified row and column. |
| public T[] | operate(final T[]
the vector to operate on v)Overrides org. Implements org. Returns the result of multiplying this by the vector |
| public T[] | preMultiply(final T[]
the row vector to premultiply by v)Overrides org. Implements org. Returns the (row) vector result of premultiplying this by the vector
|
| public void | setEntry(final int
row location of entry to be set row, final int column location of entry to be set column, final T matrix entry to be set in row,column value)Implements abstract org. Implements org. Set the entry in the specified row and column. |
| public void | setSubMatrix(final T[][]
Array containing the submatrix replacement data. subMatrix, final int Row coordinate of the top-left element to be replaced. row, final int Column coordinate of the top-left element to be replaced. column)Overrides org. Implements org. Replace the submatrix starting at |
| public Array2DRowFieldMatrix | Returns: this + m.Matrix to be subtracted. m)Subtract |
| public T | walkInColumnOrder(final FieldMatrixChangingVisitor<T>
visitor used to process all matrix entries visitor)Overrides org. Implements org. Visit (and possibly change) all matrix entries in column order. |
| public T | walkInColumnOrder(final FieldMatrixPreservingVisitor<T>
visitor used to process all matrix entries visitor)Overrides org. Implements org. Visit (but don't change) all matrix entries in column order. |
| public T | walkInColumnOrder(final FieldMatrixChangingVisitor<T>
visitor used to process all matrix entries visitor, final int Initial row index startRow, final int Final row index (inclusive) endRow, final int Initial column index startColumn, final int Final column index endColumn)Overrides org. Implements org. Visit (and possibly change) some matrix entries in column order. |
| public T | walkInColumnOrder(final FieldMatrixPreservingVisitor<T>
visitor used to process all matrix entries visitor, final int Initial row index startRow, final int Final row index (inclusive) endRow, final int Initial column index startColumn, final int Final column index endColumn)Overrides org. Implements org. Visit (but don't change) some matrix entries in column order. |
| public T | walkInRowOrder(final FieldMatrixChangingVisitor<T>
visitor used to process all matrix entries visitor)Overrides org. Implements org. Visit (and possibly change) all matrix entries in row order. |
| public T | walkInRowOrder(final FieldMatrixPreservingVisitor<T>
visitor used to process all matrix entries visitor)Overrides org. Implements org. Visit (but don't change) all matrix entries in row order. |
| public T | walkInRowOrder(final FieldMatrixChangingVisitor<T>
visitor used to process all matrix entries visitor, final int Initial row index startRow, final int Final row index (inclusive) endRow, final int Initial column index startColumn, final int Final column index endColumn)Overrides org. Implements org. Visit (and possibly change) some matrix entries in row order. |
| public T | walkInRowOrder(final FieldMatrixPreservingVisitor<T>
visitor used to process all matrix entries visitor, final int Initial row index startRow, final int Final row index (inclusive) endRow, final int Initial column index startColumn, final int Final column index endColumn)Overrides org. Implements org. Visit (but don't change) some matrix entries in row order. |
| data | back to summary |
|---|---|
| private T[][] data Entries of the matrix | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Serializable version identifier | |
| Array2DRowFieldMatrix | back to summary |
|---|---|
| public Array2DRowFieldMatrix(final Field<T> field) Creates a matrix with no data
| |
| Array2DRowFieldMatrix | back to summary |
|---|---|
| public Array2DRowFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException Create a new
| |
| Array2DRowFieldMatrix | back to summary |
|---|---|
| public Array2DRowFieldMatrix(final T[][] d) throws DimensionMismatchException, NullArgumentException, NoDataException Create a new The input array is copied, not referenced. This constructor has
the same effect as calling
| |
| Array2DRowFieldMatrix | back to summary |
|---|---|
| public Array2DRowFieldMatrix(final Field<T> field, final T[][] d) throws DimensionMismatchException, NullArgumentException, NoDataException Create a new The input array is copied, not referenced. This constructor has
the same effect as calling
| |
| Array2DRowFieldMatrix | back to summary |
|---|---|
| public Array2DRowFieldMatrix(final T[][] d, final boolean copyArray) throws DimensionMismatchException, NoDataException, NullArgumentException Create a new If an array is built specially in order to be embedded in a
| |
| Array2DRowFieldMatrix | back to summary |
|---|---|
| public Array2DRowFieldMatrix(final Field<T> field, final T[][] d, final boolean copyArray) throws DimensionMismatchException, NoDataException, NullArgumentException Create a new If an array is built specially in order to be embedded in a
| |
| Array2DRowFieldMatrix | back to summary |
|---|---|
| public Array2DRowFieldMatrix(final T[] v) throws NoDataException Create a new (column)
| |
| Array2DRowFieldMatrix | back to summary |
|---|---|
| public Array2DRowFieldMatrix(final Field<T> field, final T[] v) Create a new (column)
| |
| add | back to summary |
|---|---|
| public Array2DRowFieldMatrix Add
| |
| addToEntry | back to summary |
|---|---|
| public void addToEntry(final int row, final int column, final T increment) throws OutOfRangeException Implements abstract org. Implements org. Doc from org. Change an entry in the specified row and column.
| |
| copy | back to summary |
|---|---|
| public FieldMatrix Implements abstract org. Implements org. Doc from org. Make a (deep) copy of this.
| |
| copyIn | back to summary |
|---|---|
| private void copyIn(final T[][] in) throws NullArgumentException, NoDataException, DimensionMismatchException Replace data with a fresh copy of the input array.
| |
| copyOut | back to summary |
|---|---|
| private T[][] copyOut() Get a fresh copy of the underlying data array.
| |
| createMatrix | back to summary |
|---|---|
| public FieldMatrix Implements abstract org. Implements org. Doc from org. Create a new FieldMatrix Doc from org. the number of rows in the new matrix
Doc from org. the number of columns in the new matrix
Doc from org. a new matrix of the same type as the instance
Doc from org. if row or column dimension is not positive.
| |
| getColumnDimension | back to summary |
|---|---|
| public int getColumnDimension() Implements abstract org. Implements org. Doc from org. Returns the number of columns in the matrix.
| |
| getData | back to summary |
|---|---|
| public T[][] getData() Overrides org. Implements org. Doc from org. Returns matrix entries as a two-dimensional array.
| |
| getDataRef | back to summary |
|---|---|
| public T[][] getDataRef() Get a reference to the underlying data array. This methods returns internal data, not fresh copy of it.
| |
| getEntry | back to summary |
|---|---|
| public T getEntry(final int row, final int column) throws OutOfRangeException Implements abstract org. Implements org. Doc from org. Returns the entry in the specified row and column.
| |
| getRowDimension | back to summary |
|---|---|
| public int getRowDimension() Implements abstract org. Implements org. Doc from org. Returns the number of rows in the matrix.
| |
| multiply | back to summary |
|---|---|
| public Array2DRowFieldMatrix Postmultiplying this matrix by
| |
| multiplyEntry | back to summary |
|---|---|
| public void multiplyEntry(final int row, final int column, final T factor) throws OutOfRangeException Implements abstract org. Implements org. Doc from org. Change an entry in the specified row and column.
| |
| operate | back to summary |
|---|---|
| public T[] operate(final T[] v) throws DimensionMismatchException Overrides org. Implements org. Doc from org. Returns the result of multiplying this by the vector
| |
| preMultiply | back to summary |
|---|---|
| public T[] preMultiply(final T[] v) throws DimensionMismatchException Overrides org. Implements org. Doc from org. Returns the (row) vector result of premultiplying this by the vector
| |
| setEntry | back to summary |
|---|---|
| public void setEntry(final int row, final int column, final T value) throws OutOfRangeException Implements abstract org. Implements org. Doc from org. Set the entry in the specified row and column.
| |
| setSubMatrix | back to summary |
|---|---|
| public void setSubMatrix(final T[][] subMatrix, final int row, final int column) throws OutOfRangeException, NullArgumentException, NoDataException, DimensionMismatchException Overrides org. Implements org. Doc from org. Replace the submatrix starting at
Example: 1 2 3 4 5 6 7 8 9 0 1 2and subMatrix = {{3, 4} {5,6}}, invoking
setSubMatrix(subMatrix,1,1)) will result in
1 2 3 4 5 3 4 8 9 5 6 2
| |
| subtract | back to summary |
|---|---|
| public Array2DRowFieldMatrix Subtract
| |
| walkInColumnOrder | back to summary |
|---|---|
| public T walkInColumnOrder(final FieldMatrixChangingVisitor<T> visitor) Overrides org. Implements org. Doc from org. Visit (and possibly change) all matrix entries in column order. Column order starts at upper left and iterating through all elements of a column from top to bottom before going to the topmost element of the next column.
| |
| walkInColumnOrder | back to summary |
|---|---|
| public T walkInColumnOrder(final FieldMatrixPreservingVisitor<T> visitor) Overrides org. Implements org. Doc from org. Visit (but don't change) all matrix entries in column order. Column order starts at upper left and iterating through all elements of a column from top to bottom before going to the topmost element of the next column.
| |
| walkInRowOrder | back to summary |
|---|---|
| public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor) Overrides org. Implements org. Doc from org. Visit (and possibly change) all matrix entries in row order. Row order starts at upper left and iterating through all elements of a row from left to right before going to the leftmost element of the next row.
| |
| walkInRowOrder | back to summary |
|---|---|
| public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor) Overrides org. Implements org. Doc from org. Visit (but don't change) all matrix entries in row order. Row order starts at upper left and iterating through all elements of a row from left to right before going to the leftmost element of the next row.
| |