T
- the type of the field elementsSerializable
, AnyMatrix
, FieldMatrix<T>
public class Array2DRowFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMatrix<T> implements Serializable
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.
Constructor | Description |
---|---|
Array2DRowFieldMatrix(Field<T> field) |
Creates a matrix with no data
|
Array2DRowFieldMatrix(Field<T> field,
int rowDimension,
int columnDimension) |
Create a new
FieldMatrix<T> with the supplied row and column dimensions. |
Array2DRowFieldMatrix(Field<T> field,
T[] v) |
Create a new (column)
FieldMatrix<T> using v as the
data for the unique column of the created matrix. |
Array2DRowFieldMatrix(Field<T> field,
T[][] d) |
Create a new
FieldMatrix<T> using the input array as the underlying
data array. |
Array2DRowFieldMatrix(Field<T> field,
T[][] d,
boolean copyArray) |
Create a new
FieldMatrix<T> using the input array as the underlying
data array. |
Array2DRowFieldMatrix(T[] v) |
Create a new (column)
FieldMatrix<T> using v as the
data for the unique column of the created matrix. |
Array2DRowFieldMatrix(T[][] d) |
Create a new
FieldMatrix<T> using the input array as the underlying
data array. |
Array2DRowFieldMatrix(T[][] d,
boolean copyArray) |
Create a new
FieldMatrix<T> using the input array as the underlying
data array. |
Modifier and Type | Method | Description |
---|---|---|
Array2DRowFieldMatrix<T> |
add(Array2DRowFieldMatrix<T> m) |
Add
m to this matrix. |
void |
addToEntry(int row,
int column,
T increment) |
Change an entry in the specified row and column.
|
FieldMatrix<T> |
copy() |
Make a (deep) copy of this.
|
FieldMatrix<T> |
createMatrix(int rowDimension,
int columnDimension) |
Create a new FieldMatrix
|
int |
getColumnDimension() |
Returns the number of columns in the matrix.
|
T[][] |
getData() |
Returns matrix entries as a two-dimensional array.
|
T[][] |
getDataRef() |
Get a reference to the underlying data array.
|
T |
getEntry(int row,
int column) |
Returns the entry in the specified row and column.
|
T[] |
getRow(int row) |
Get the entries in row number
row as an array. |
int |
getRowDimension() |
Returns the number of rows in the matrix.
|
FieldMatrix<T> |
getSubMatrix(int startRow,
int endRow,
int startColumn,
int endColumn) |
Get a submatrix.
|
Array2DRowFieldMatrix<T> |
multiply(Array2DRowFieldMatrix<T> m) |
Postmultiplying this matrix by
m . |
void |
multiplyEntry(int row,
int column,
T factor) |
Change an entry in the specified row and column.
|
FieldMatrix<T> |
multiplyTransposed(Array2DRowFieldMatrix<T> m) |
Returns the result of postmultiplying
this by m^T . |
FieldMatrix<T> |
multiplyTransposed(FieldMatrix<T> m) |
Returns the result of postmultiplying
this by m^T . |
T[] |
operate(T[] v) |
Returns the result of multiplying this by the vector
v . |
T[] |
preMultiply(T[] v) |
Returns the (row) vector result of premultiplying this by the vector
v . |
void |
setEntry(int row,
int column,
T value) |
Set the entry in the specified row and column.
|
void |
setRow(int row,
T[] array) |
Set the entries in row number
row
as a row matrix. |
void |
setSubMatrix(T[][] subMatrix,
int row,
int column) |
Replace the submatrix starting at
(row, column) using data in the
input subMatrix array. |
Array2DRowFieldMatrix<T> |
subtract(Array2DRowFieldMatrix<T> m) |
Subtract
m from this matrix. |
FieldMatrix<T> |
transposeMultiply(Array2DRowFieldMatrix<T> m) |
Returns the result of postmultiplying
this^T by m . |
FieldMatrix<T> |
transposeMultiply(FieldMatrix<T> m) |
Returns the result of postmultiplying
this^T by m . |
T |
walkInColumnOrder(FieldMatrixChangingVisitor<T> visitor) |
Visit (and possibly change) all matrix entries in column order.
|
T |
walkInColumnOrder(FieldMatrixChangingVisitor<T> visitor,
int startRow,
int endRow,
int startColumn,
int endColumn) |
Visit (and possibly change) some matrix entries in column order.
|
T |
walkInColumnOrder(FieldMatrixPreservingVisitor<T> visitor) |
Visit (but don't change) all matrix entries in column order.
|
T |
walkInColumnOrder(FieldMatrixPreservingVisitor<T> visitor,
int startRow,
int endRow,
int startColumn,
int endColumn) |
Visit (but don't change) some matrix entries in column order.
|
T |
walkInRowOrder(FieldMatrixChangingVisitor<T> visitor) |
Visit (and possibly change) all matrix entries in row order.
|
T |
walkInRowOrder(FieldMatrixChangingVisitor<T> visitor,
int startRow,
int endRow,
int startColumn,
int endColumn) |
Visit (and possibly change) some matrix entries in row order.
|
T |
walkInRowOrder(FieldMatrixPreservingVisitor<T> visitor) |
Visit (but don't change) all matrix entries in row order.
|
T |
walkInRowOrder(FieldMatrixPreservingVisitor<T> visitor,
int startRow,
int endRow,
int startColumn,
int endColumn) |
Visit (but don't change) some matrix entries in row order.
|
add, checkAdditionCompatible, checkColumnIndex, checkMultiplicationCompatible, checkRowIndex, checkSubMatrixIndex, checkSubMatrixIndex, checkSubtractionCompatible, copySubMatrix, copySubMatrix, equals, extractField, extractField, getColumn, getColumnMatrix, getColumnVector, getField, getRowMatrix, getRowVector, getSubMatrix, getTrace, hashCode, isSquare, multiply, operate, power, preMultiply, preMultiply, scalarAdd, scalarMultiply, setColumn, setColumnMatrix, setColumnVector, setRowMatrix, setRowVector, subtract, toString, transpose, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder
public Array2DRowFieldMatrix(Field<T> field)
field
- field to which the elements belongpublic Array2DRowFieldMatrix(Field<T> field, int rowDimension, int columnDimension) throws MathIllegalArgumentException
FieldMatrix<T>
with the supplied row and column dimensions.field
- Field to which the elements belong.rowDimension
- Number of rows in the new matrix.columnDimension
- Number of columns in the new matrix.MathIllegalArgumentException
- if row or column dimension is not positive.public Array2DRowFieldMatrix(T[][] d) throws MathIllegalArgumentException, NullArgumentException
FieldMatrix<T>
using the input array as the underlying
data array.
The input array is copied, not referenced. This constructor has
the same effect as calling Array2DRowFieldMatrix(FieldElement[][], boolean)
with the second argument set to true
.
d
- Data for the new matrix.MathIllegalArgumentException
- if d
is not rectangular.NullArgumentException
- if d
is null
.MathIllegalArgumentException
- if there are not at least one row and one column.Array2DRowFieldMatrix(FieldElement[][], boolean)
public Array2DRowFieldMatrix(Field<T> field, T[][] d) throws MathIllegalArgumentException, NullArgumentException
FieldMatrix<T>
using the input array as the underlying
data array.
The input array is copied, not referenced. This constructor has
the same effect as calling Array2DRowFieldMatrix(FieldElement[][], boolean)
with the second argument set to true
.
field
- Field to which the elements belong.d
- Data for the new matrix.MathIllegalArgumentException
- if d
is not rectangular.NullArgumentException
- if d
is null
.MathIllegalArgumentException
- if there are not at least one row and one column.Array2DRowFieldMatrix(FieldElement[][], boolean)
public Array2DRowFieldMatrix(T[][] d, boolean copyArray) throws MathIllegalArgumentException, NullArgumentException
FieldMatrix<T>
using the input array as the underlying
data array.
If an array is built specially in order to be embedded in a
FieldMatrix<T>
and not used directly, the copyArray
may be
set to false
. This will prevent the copying and improve
performance as no new array will be built and no data will be copied.
d
- Data for the new matrix.copyArray
- Whether to copy or reference the input array.MathIllegalArgumentException
- if d
is not rectangular.MathIllegalArgumentException
- if there are not at least one row and one column.NullArgumentException
- if d
is null
.Array2DRowFieldMatrix(FieldElement[][])
public Array2DRowFieldMatrix(Field<T> field, T[][] d, boolean copyArray) throws MathIllegalArgumentException, NullArgumentException
FieldMatrix<T>
using the input array as the underlying
data array.
If an array is built specially in order to be embedded in a
FieldMatrix<T>
and not used directly, the copyArray
may be
set to false
. This will prevent the copying and improve
performance as no new array will be built and no data will be copied.
field
- Field to which the elements belong.d
- Data for the new matrix.copyArray
- Whether to copy or reference the input array.MathIllegalArgumentException
- if d
is not rectangular.MathIllegalArgumentException
- if there are not at least one row and one column.NullArgumentException
- if d
is null
.Array2DRowFieldMatrix(FieldElement[][])
public Array2DRowFieldMatrix(T[] v) throws MathIllegalArgumentException
FieldMatrix<T>
using v
as the
data for the unique column of the created matrix.
The input array is copied.v
- Column vector holding data for new matrix.MathIllegalArgumentException
- if v is emptypublic Array2DRowFieldMatrix(Field<T> field, T[] v)
FieldMatrix<T>
using v
as the
data for the unique column of the created matrix.
The input array is copied.field
- Field to which the elements belong.v
- Column vector holding data for new matrix.public FieldMatrix<T> createMatrix(int rowDimension, int columnDimension) throws MathIllegalArgumentException
createMatrix
in interface FieldMatrix<T extends FieldElement<T>>
createMatrix
in class AbstractFieldMatrix<T extends FieldElement<T>>
rowDimension
- the number of rows in the new matrixcolumnDimension
- the number of columns in the new matrixMathIllegalArgumentException
- if row or column dimension is not
positive.public FieldMatrix<T> copy()
copy
in interface FieldMatrix<T extends FieldElement<T>>
copy
in class AbstractFieldMatrix<T extends FieldElement<T>>
public Array2DRowFieldMatrix<T> add(Array2DRowFieldMatrix<T> m) throws MathIllegalArgumentException
m
to this matrix.m
- Matrix to be added.this
+ m.MathIllegalArgumentException
- if m
is not the same
size as this matrix.public Array2DRowFieldMatrix<T> subtract(Array2DRowFieldMatrix<T> m) throws MathIllegalArgumentException
m
from this matrix.m
- Matrix to be subtracted.this
+ m.MathIllegalArgumentException
- if m
is not the same
size as this matrix.public Array2DRowFieldMatrix<T> multiply(Array2DRowFieldMatrix<T> m) throws MathIllegalArgumentException
m
.m
- Matrix to postmultiply by.this
* m.MathIllegalArgumentException
- if the number of columns of this
matrix is not equal to the number of rows of m
.public FieldMatrix<T> multiplyTransposed(Array2DRowFieldMatrix<T> m) throws MathIllegalArgumentException
this
by m^T
.m
- matrix to first transpose and second postmultiply bythis * m^T
MathIllegalArgumentException
- if
columnDimension(this) != columnDimension(m)
public FieldMatrix<T> multiplyTransposed(FieldMatrix<T> m)
this
by m^T
.
This is equivalent to call multiply
(m.FieldMatrix.transpose()
),
but some implementations may avoid building the intermediate transposed matrix.
multiplyTransposed
in interface FieldMatrix<T extends FieldElement<T>>
m
- matrix to first transpose and second postmultiply bythis * m^T
public FieldMatrix<T> transposeMultiply(Array2DRowFieldMatrix<T> m) throws MathIllegalArgumentException
this^T
by m
.m
- matrix to postmultiply bythis^T * m
MathIllegalArgumentException
- if
columnDimension(this) != columnDimension(m)
public FieldMatrix<T> transposeMultiply(FieldMatrix<T> m)
this^T
by m
.
This is equivalent to call FieldMatrix.transpose()
.multiply(m)
,
but some implementations may avoid building the intermediate transposed matrix.
transposeMultiply
in interface FieldMatrix<T extends FieldElement<T>>
m
- matrix to postmultiply bythis^T * m
public T[][] getData()
getData
in interface FieldMatrix<T extends FieldElement<T>>
getData
in class AbstractFieldMatrix<T extends FieldElement<T>>
public T[][] getDataRef()
public void setSubMatrix(T[][] subMatrix, int row, int column) throws MathIllegalArgumentException, NullArgumentException
(row, column)
using data in the
input subMatrix
array. Indexes are 0-based.
Example:
Starting with
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
setSubMatrix
in interface FieldMatrix<T extends FieldElement<T>>
setSubMatrix
in class AbstractFieldMatrix<T extends FieldElement<T>>
subMatrix
- Array containing the submatrix replacement data.row
- Row coordinate of the top-left element to be replaced.column
- Column coordinate of the top-left element to be replaced.MathIllegalArgumentException
- if subMatrix
does not fit into this
matrix from element in (row, column)
.NullArgumentException
- if subMatrix
is null
.public T getEntry(int row, int column) throws MathIllegalArgumentException
getEntry
in interface FieldMatrix<T extends FieldElement<T>>
getEntry
in class AbstractFieldMatrix<T extends FieldElement<T>>
row
- row location of entry to be fetchedcolumn
- column location of entry to be fetchedMathIllegalArgumentException
- if the row or column index is not valid.public void setEntry(int row, int column, T value) throws MathIllegalArgumentException
setEntry
in interface FieldMatrix<T extends FieldElement<T>>
setEntry
in class AbstractFieldMatrix<T extends FieldElement<T>>
row
- row location of entry to be setcolumn
- column location of entry to be setvalue
- matrix entry to be set in row,columnMathIllegalArgumentException
- if the row or column index is not valid.public void addToEntry(int row, int column, T increment) throws MathIllegalArgumentException
addToEntry
in interface FieldMatrix<T extends FieldElement<T>>
addToEntry
in class AbstractFieldMatrix<T extends FieldElement<T>>
row
- Row location of entry to be set.column
- Column location of entry to be set.increment
- Value to add to the current matrix entry in
(row, column)
.MathIllegalArgumentException
- if the row or column index is not valid.public void multiplyEntry(int row, int column, T factor) throws MathIllegalArgumentException
multiplyEntry
in interface FieldMatrix<T extends FieldElement<T>>
multiplyEntry
in class AbstractFieldMatrix<T extends FieldElement<T>>
row
- Row location of entry to be set.column
- Column location of entry to be set.factor
- Multiplication factor for the current matrix entry
in (row,column)
MathIllegalArgumentException
- if the row or column index is not valid.public int getRowDimension()
getRowDimension
in interface AnyMatrix
getRowDimension
in class AbstractFieldMatrix<T extends FieldElement<T>>
public int getColumnDimension()
getColumnDimension
in interface AnyMatrix
getColumnDimension
in class AbstractFieldMatrix<T extends FieldElement<T>>
public T[] operate(T[] v) throws MathIllegalArgumentException
v
.operate
in interface FieldMatrix<T extends FieldElement<T>>
operate
in class AbstractFieldMatrix<T extends FieldElement<T>>
v
- the vector to operate onthis * v
MathIllegalArgumentException
- if the number of columns of
this
matrix is not equal to the size of the vector v
.public T[] preMultiply(T[] v) throws MathIllegalArgumentException
v
.preMultiply
in interface FieldMatrix<T extends FieldElement<T>>
preMultiply
in class AbstractFieldMatrix<T extends FieldElement<T>>
v
- the row vector to premultiply byv * this
MathIllegalArgumentException
- if the number of rows of this
matrix is not equal to the size of the vector v
public FieldMatrix<T> getSubMatrix(int startRow, int endRow, int startColumn, int endColumn) throws MathIllegalArgumentException
getSubMatrix
in interface FieldMatrix<T extends FieldElement<T>>
getSubMatrix
in class AbstractFieldMatrix<T extends FieldElement<T>>
startRow
- Initial row indexendRow
- Final row index (inclusive)startColumn
- Initial column indexendColumn
- Final column index (inclusive)MathIllegalArgumentException
- is endRow < startRow
of
endColumn < startColumn
.public T walkInRowOrder(FieldMatrixChangingVisitor<T> visitor)
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
in interface FieldMatrix<T extends FieldElement<T>>
walkInRowOrder
in class AbstractFieldMatrix<T extends FieldElement<T>>
visitor
- visitor used to process all matrix entriesFieldMatrixChangingVisitor.end()
at the end
of the walkFieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor, int, int, int, int)
public T walkInRowOrder(FieldMatrixPreservingVisitor<T> visitor)
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
in interface FieldMatrix<T extends FieldElement<T>>
walkInRowOrder
in class AbstractFieldMatrix<T extends FieldElement<T>>
visitor
- visitor used to process all matrix entriesFieldMatrixPreservingVisitor.end()
at the end
of the walkFieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor, int, int, int, int)
public T walkInRowOrder(FieldMatrixChangingVisitor<T> visitor, int startRow, int endRow, int startColumn, int endColumn) throws MathIllegalArgumentException
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
in interface FieldMatrix<T extends FieldElement<T>>
walkInRowOrder
in class AbstractFieldMatrix<T extends FieldElement<T>>
visitor
- visitor used to process all matrix entriesstartRow
- Initial row indexendRow
- Final row index (inclusive)startColumn
- Initial column indexendColumn
- Final column indexFieldMatrixChangingVisitor.end()
at the end
of the walkMathIllegalArgumentException
- if the indices are not valid.FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor, int, int, int, int)
public T walkInRowOrder(FieldMatrixPreservingVisitor<T> visitor, int startRow, int endRow, int startColumn, int endColumn) throws MathIllegalArgumentException
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
in interface FieldMatrix<T extends FieldElement<T>>
walkInRowOrder
in class AbstractFieldMatrix<T extends FieldElement<T>>
visitor
- visitor used to process all matrix entriesstartRow
- Initial row indexendRow
- Final row index (inclusive)startColumn
- Initial column indexendColumn
- Final column indexFieldMatrixPreservingVisitor.end()
at the end
of the walkMathIllegalArgumentException
- if the indices are not valid.FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor, int, int, int, int)
public T walkInColumnOrder(FieldMatrixChangingVisitor<T> visitor)
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
in interface FieldMatrix<T extends FieldElement<T>>
walkInColumnOrder
in class AbstractFieldMatrix<T extends FieldElement<T>>
visitor
- visitor used to process all matrix entriesFieldMatrixChangingVisitor.end()
at the end
of the walkFieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor, int, int, int, int)
public T walkInColumnOrder(FieldMatrixPreservingVisitor<T> visitor)
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
in interface FieldMatrix<T extends FieldElement<T>>
walkInColumnOrder
in class AbstractFieldMatrix<T extends FieldElement<T>>
visitor
- visitor used to process all matrix entriesFieldMatrixPreservingVisitor.end()
at the end
of the walkFieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor, int, int, int, int)
public T walkInColumnOrder(FieldMatrixChangingVisitor<T> visitor, int startRow, int endRow, int startColumn, int endColumn) throws MathIllegalArgumentException
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
in interface FieldMatrix<T extends FieldElement<T>>
walkInColumnOrder
in class AbstractFieldMatrix<T extends FieldElement<T>>
visitor
- visitor used to process all matrix entriesstartRow
- Initial row indexendRow
- Final row index (inclusive)startColumn
- Initial column indexendColumn
- Final column indexFieldMatrixChangingVisitor.end()
at the end
of the walkMathIllegalArgumentException
- if endRow < startRow
or
endColumn < startColumn
.FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor, int, int, int, int)
public T walkInColumnOrder(FieldMatrixPreservingVisitor<T> visitor, int startRow, int endRow, int startColumn, int endColumn) throws MathIllegalArgumentException
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
in interface FieldMatrix<T extends FieldElement<T>>
walkInColumnOrder
in class AbstractFieldMatrix<T extends FieldElement<T>>
visitor
- visitor used to process all matrix entriesstartRow
- Initial row indexendRow
- Final row index (inclusive)startColumn
- Initial column indexendColumn
- Final column indexFieldMatrixPreservingVisitor.end()
at the end
of the walkMathIllegalArgumentException
- if endRow < startRow
or
endColumn < startColumn
.FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInRowOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInRowOrder(FieldMatrixPreservingVisitor, int, int, int, int)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInColumnOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixChangingVisitor, int, int, int, int)
,
FieldMatrix.walkInOptimizedOrder(FieldMatrixPreservingVisitor, int, int, int, int)
public T[] getRow(int row) throws MathIllegalArgumentException
row
as an array.getRow
in interface FieldMatrix<T extends FieldElement<T>>
getRow
in class AbstractFieldMatrix<T extends FieldElement<T>>
row
- Row to be fetched.MathIllegalArgumentException
- if the specified row index is not valid.public void setRow(int row, T[] array) throws MathIllegalArgumentException
row
as a row matrix.setRow
in interface FieldMatrix<T extends FieldElement<T>>
setRow
in class AbstractFieldMatrix<T extends FieldElement<T>>
row
- Row to be set.array
- Row matrix (must have the same number of columns as
the instance).MathIllegalArgumentException
- if the specified row index is invalid.Copyright © 2016–2018 Hipparchus.org. All rights reserved.