Top Description Fields Constructors Methods
org.apache.commons.math3.linear

public Class Array2DRowFieldMatrix<T extends FieldElement<T>>

extends AbstractFieldMatrix<T extends FieldElement<T>>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Type Parameters
<T>
the type of the field elements
Imports
java.io.Serializable, org.apache.commons.math3.Field, .FieldElement, org.apache.commons.math3.exception.NoDataException, .DimensionMismatchException, .MathIllegalStateException, .NotStrictlyPositiveException, .NullArgumentException, .NumberIsTooSmallException, .OutOfRangeException, org.apache.commons.math3.exception.util.LocalizedFormats, org.apache.commons.math3.util.MathArrays, .MathUtils

Implementation of FieldMatrix using a 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.

Field Summary

Modifier and TypeField and Description
private T[][]
data

Entries of the matrix

private static final long
serialVersionUID

Serializable version identifier

Constructor Summary

AccessConstructor 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 FieldMatrix<T> with the supplied row and column dimensions.

public
Array2DRowFieldMatrix(final T[][]
Data for the new matrix.
d
)

Create a new FieldMatrix<T> using the input array as the underlying data array.

public
Array2DRowFieldMatrix(final Field<T>
Field to which the elements belong.
field
,
final T[][]
Data for the new matrix.
d
)

Create a new FieldMatrix<T> using the input array as the underlying data array.

public
Array2DRowFieldMatrix(final T[][]
Data for the new matrix.
d
,
final boolean
Whether to copy or reference the input array.
copyArray
)

Create a new FieldMatrix<T> using the input array as the underlying data array.

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 FieldMatrix<T> using the input array as the underlying data array.

public
Array2DRowFieldMatrix(final T[]
Column vector holding data for new matrix.
v
)

Create a new (column) FieldMatrix<T> using v as the data for the unique column of the created matrix.

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) FieldMatrix<T> using v as the data for the unique column of the created matrix.

Method Summary

Modifier and TypeMethod and Description
public Array2DRowFieldMatrix<T>

Returns:

this + m.
add
(final Array2DRowFieldMatrix<T>
Matrix to be added.
m
)

Add m to this matrix.

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 (row, column).
increment
)

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.addToEntry.

Implements org.apache.commons.math3.linear.FieldMatrix.addToEntry.

Change an entry in the specified row and column.

public FieldMatrix<T>
private void
copyIn(final T[][]
Data to copy.
in
)

Replace data with a fresh copy of the input array.

private T[][]

Returns:

a copy of the underlying data array.
copyOut
()

Get a fresh copy of the underlying data array.

public FieldMatrix<T>
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.apache.commons.math3.linear.AbstractFieldMatrix.createMatrix.

Implements org.apache.commons.math3.linear.FieldMatrix.createMatrix.

Create a new FieldMatrix<t> of the same type as the instance with the supplied row and column dimensions.

public int
public T[][]
getData()

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.getData.

Implements org.apache.commons.math3.linear.FieldMatrix.getData.

Returns matrix entries as a two-dimensional array.

public T[][]

Returns:

the 2-dimensional array of entries.
getDataRef
()

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.apache.commons.math3.linear.AbstractFieldMatrix.getEntry.

Implements org.apache.commons.math3.linear.FieldMatrix.getEntry.

Returns the entry in the specified row and column.

public int
public Array2DRowFieldMatrix<T>

Returns:

this * m.
multiply
(final Array2DRowFieldMatrix<T>
Matrix to postmultiply by.
m
)

Postmultiplying this matrix by m.

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 (row,column)
factor
)

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.multiplyEntry.

Implements org.apache.commons.math3.linear.FieldMatrix.multiplyEntry.

Change an entry in the specified row and column.

public T[]
operate(final T[]
the vector to operate on
v
)

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.operate.

Implements org.apache.commons.math3.linear.FieldMatrix.operate.

Returns the result of multiplying this by the vector v.

public T[]
preMultiply(final T[]
the row vector to premultiply by
v
)

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.preMultiply.

Implements org.apache.commons.math3.linear.FieldMatrix.preMultiply.

Returns the (row) vector result of premultiplying this by the vector v.

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.apache.commons.math3.linear.AbstractFieldMatrix.setEntry.

Implements org.apache.commons.math3.linear.FieldMatrix.setEntry.

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.apache.commons.math3.linear.AbstractFieldMatrix.setSubMatrix.

Implements org.apache.commons.math3.linear.FieldMatrix.setSubMatrix.

Replace the submatrix starting at (row, column) using data in the input subMatrix array.

public Array2DRowFieldMatrix<T>

Returns:

this + m.
subtract
(final Array2DRowFieldMatrix<T>
Matrix to be subtracted.
m
)

Subtract m from this matrix.

public T
walkInColumnOrder(final FieldMatrixChangingVisitor<T>
visitor used to process all matrix entries
visitor
)

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

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.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

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.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

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.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

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.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

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.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

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.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

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.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Visit (but don't change) some matrix entries in row order.

Inherited from org.apache.commons.math3.linear.AbstractFieldMatrix:
addbuildArraybuildArraycheckAdditionCompatiblecheckColumnIndexcheckMultiplicationCompatiblecheckRowIndexcheckSubMatrixIndexcheckSubMatrixIndexcheckSubtractionCompatiblecopySubMatrixcopySubMatrixequalsextractFieldextractFieldgetColumngetColumnMatrixgetColumnVectorgetFieldgetRowgetRowMatrixgetRowVectorgetSubMatrixgetSubMatrixgetTracehashCodeisSquaremultiplyoperatepowerpreMultiplypreMultiplyscalarAddscalarMultiplysetColumnsetColumnMatrixsetColumnVectorsetRowsetRowMatrixsetRowVectorsubtracttoStringtransposewalkInOptimizedOrderwalkInOptimizedOrderwalkInOptimizedOrderwalkInOptimizedOrder

Field Detail

databack to summary
private T[][] data

Entries of the matrix

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable version identifier

Constructor Detail

Array2DRowFieldMatrixback to summary
public Array2DRowFieldMatrix(final Field<T> field)

Creates a matrix with no data

Parameters
field:Field<T>

field to which the elements belong

Array2DRowFieldMatrixback to summary
public Array2DRowFieldMatrix(final Field<T> field, final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException

Create a new FieldMatrix<T> with the supplied row and column dimensions.

Parameters
field:Field<T>

Field to which the elements belong.

rowDimension:int

Number of rows in the new matrix.

columnDimension:int

Number of columns in the new matrix.

Exceptions
NotStrictlyPositiveException:
if row or column dimension is not positive.
Array2DRowFieldMatrixback to summary
public Array2DRowFieldMatrix(final T[][] d) throws DimensionMismatchException, NullArgumentException, NoDataException

Create a new 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.

Parameters
d:T[][]

Data for the new matrix.

Exceptions
DimensionMismatchException:
if d is not rectangular.
NullArgumentException:
if d is null.
NoDataException:
if there are not at least one row and one column.
See Also
Array2DRowFieldMatrix(FieldElement[][], boolean)
Array2DRowFieldMatrixback to summary
public Array2DRowFieldMatrix(final Field<T> field, final T[][] d) throws DimensionMismatchException, NullArgumentException, NoDataException

Create a new 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.

Parameters
field:Field<T>

Field to which the elements belong.

d:T[][]

Data for the new matrix.

Exceptions
DimensionMismatchException:
if d is not rectangular.
NullArgumentException:
if d is null.
NoDataException:
if there are not at least one row and one column.
See Also
Array2DRowFieldMatrix(FieldElement[][], boolean)
Array2DRowFieldMatrixback to summary
public Array2DRowFieldMatrix(final T[][] d, final boolean copyArray) throws DimensionMismatchException, NoDataException, NullArgumentException

Create a new 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.

Parameters
d:T[][]

Data for the new matrix.

copyArray:boolean

Whether to copy or reference the input array.

Exceptions
DimensionMismatchException:
if d is not rectangular.
NoDataException:
if there are not at least one row and one column.
NullArgumentException:
if d is null.
See Also
Array2DRowFieldMatrix(FieldElement[][])
Array2DRowFieldMatrixback to summary
public Array2DRowFieldMatrix(final Field<T> field, final T[][] d, final boolean copyArray) throws DimensionMismatchException, NoDataException, NullArgumentException

Create a new 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.

Parameters
field:Field<T>

Field to which the elements belong.

d:T[][]

Data for the new matrix.

copyArray:boolean

Whether to copy or reference the input array.

Exceptions
DimensionMismatchException:
if d is not rectangular.
NoDataException:
if there are not at least one row and one column.
NullArgumentException:
if d is null.
See Also
Array2DRowFieldMatrix(FieldElement[][])
Array2DRowFieldMatrixback to summary
public Array2DRowFieldMatrix(final T[] v) throws NoDataException

Create a new (column) FieldMatrix<T> using v as the data for the unique column of the created matrix. The input array is copied.

Parameters
v:T[]

Column vector holding data for new matrix.

Exceptions
NoDataException:
if v is empty
Array2DRowFieldMatrixback to summary
public Array2DRowFieldMatrix(final Field<T> field, final T[] v)

Create a new (column) FieldMatrix<T> using v as the data for the unique column of the created matrix. The input array is copied.

Parameters
field:Field<T>

Field to which the elements belong.

v:T[]

Column vector holding data for new matrix.

Method Detail

addback to summary
public Array2DRowFieldMatrix<T> add(final Array2DRowFieldMatrix<T> m) throws MatrixDimensionMismatchException

Add m to this matrix.

Parameters
m:Array2DRowFieldMatrix<T>

Matrix to be added.

Returns:Array2DRowFieldMatrix<T>

this + m.

Exceptions
MatrixDimensionMismatchException:
if m is not the same size as this matrix.
addToEntryback to summary
public void addToEntry(final int row, final int column, final T increment) throws OutOfRangeException

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.addToEntry.

Implements org.apache.commons.math3.linear.FieldMatrix.addToEntry.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.addToEntry.

Change an entry in the specified row and column.

Parameters
row:int

Doc from org.apache.commons.math3.linear.FieldMatrix.addToEntry.

Row location of entry to be set.

column:int

Doc from org.apache.commons.math3.linear.FieldMatrix.addToEntry.

Column location of entry to be set.

increment:T

Doc from org.apache.commons.math3.linear.FieldMatrix.addToEntry.

Value to add to the current matrix entry in (row, column).

Annotations
@Override
Exceptions
OutOfRangeException:

Doc from org.apache.commons.math3.linear.FieldMatrix.addToEntry.

if the row or column index is not valid.

copyback to summary
public FieldMatrix<T> copy()

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.copy.

Implements org.apache.commons.math3.linear.FieldMatrix.copy.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.copy.

Make a (deep) copy of this.

Returns:FieldMatrix<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.copy.

a copy of this matrix.

Annotations
@Override
copyInback to summary
private void copyIn(final T[][] in) throws NullArgumentException, NoDataException, DimensionMismatchException

Replace data with a fresh copy of the input array.

Parameters
in:T[][]

Data to copy.

Exceptions
NullArgumentException:
if the input array is null.
NoDataException:
if the input array is empty.
DimensionMismatchException:
if the input array is not rectangular.
copyOutback to summary
private T[][] copyOut()

Get a fresh copy of the underlying data array.

Returns:T[][]

a copy of the underlying data array.

createMatrixback to summary
public FieldMatrix<T> createMatrix(final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.createMatrix.

Implements org.apache.commons.math3.linear.FieldMatrix.createMatrix.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.createMatrix.

Create a new FieldMatrix of the same type as the instance with the supplied row and column dimensions.

Parameters
rowDimension:int

Doc from org.apache.commons.math3.linear.FieldMatrix.createMatrix.

the number of rows in the new matrix

columnDimension:int

Doc from org.apache.commons.math3.linear.FieldMatrix.createMatrix.

the number of columns in the new matrix

Returns:FieldMatrix<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.createMatrix.

a new matrix of the same type as the instance

Annotations
@Override
Exceptions
NotStrictlyPositiveException:

Doc from org.apache.commons.math3.linear.FieldMatrix.createMatrix.

if row or column dimension is not positive.

getColumnDimensionback to summary
public int getColumnDimension()

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.getColumnDimension.

Implements org.apache.commons.math3.linear.AnyMatrix.getColumnDimension.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.getColumnDimension.

Returns the number of columns in the matrix.

Returns:int

Doc from org.apache.commons.math3.linear.AnyMatrix.getColumnDimension.

columnDimension

Annotations
@Override
getDataback to summary
public T[][] getData()

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.getData.

Implements org.apache.commons.math3.linear.FieldMatrix.getData.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.getData.

Returns matrix entries as a two-dimensional array.

Returns:T[][]

Doc from org.apache.commons.math3.linear.FieldMatrix.getData.

a 2-dimensional array of entries.

Annotations
@Override
getDataRefback to summary
public T[][] getDataRef()

Get a reference to the underlying data array. This methods returns internal data, not fresh copy of it.

Returns:T[][]

the 2-dimensional array of entries.

getEntryback to summary
public T getEntry(final int row, final int column) throws OutOfRangeException

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.getEntry.

Implements org.apache.commons.math3.linear.FieldMatrix.getEntry.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.getEntry.

Returns the entry in the specified row and column.

Parameters
row:int

Doc from org.apache.commons.math3.linear.FieldMatrix.getEntry.

row location of entry to be fetched

column:int

Doc from org.apache.commons.math3.linear.FieldMatrix.getEntry.

column location of entry to be fetched

Returns:T

Doc from org.apache.commons.math3.linear.FieldMatrix.getEntry.

matrix entry in row,column

Annotations
@Override
Exceptions
OutOfRangeException:

Doc from org.apache.commons.math3.linear.FieldMatrix.getEntry.

if the row or column index is not valid.

getRowDimensionback to summary
public int getRowDimension()

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.getRowDimension.

Implements org.apache.commons.math3.linear.AnyMatrix.getRowDimension.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.getRowDimension.

Returns the number of rows in the matrix.

Returns:int

Doc from org.apache.commons.math3.linear.AnyMatrix.getRowDimension.

rowDimension

Annotations
@Override
multiplyback to summary
public Array2DRowFieldMatrix<T> multiply(final Array2DRowFieldMatrix<T> m) throws DimensionMismatchException

Postmultiplying this matrix by m.

Parameters
m:Array2DRowFieldMatrix<T>

Matrix to postmultiply by.

Returns:Array2DRowFieldMatrix<T>

this * m.

Exceptions
DimensionMismatchException:
if the number of columns of this matrix is not equal to the number of rows of m.
multiplyEntryback to summary
public void multiplyEntry(final int row, final int column, final T factor) throws OutOfRangeException

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.multiplyEntry.

Implements org.apache.commons.math3.linear.FieldMatrix.multiplyEntry.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.multiplyEntry.

Change an entry in the specified row and column.

Parameters
row:int

Doc from org.apache.commons.math3.linear.FieldMatrix.multiplyEntry.

Row location of entry to be set.

column:int

Doc from org.apache.commons.math3.linear.FieldMatrix.multiplyEntry.

Column location of entry to be set.

factor:T

Doc from org.apache.commons.math3.linear.FieldMatrix.multiplyEntry.

Multiplication factor for the current matrix entry in (row,column)

Annotations
@Override
Exceptions
OutOfRangeException:

Doc from org.apache.commons.math3.linear.FieldMatrix.multiplyEntry.

if the row or column index is not valid.

operateback to summary
public T[] operate(final T[] v) throws DimensionMismatchException

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.operate.

Implements org.apache.commons.math3.linear.FieldMatrix.operate.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.operate.

Returns the result of multiplying this by the vector v.

Parameters
v:T[]

Doc from org.apache.commons.math3.linear.FieldMatrix.operate.

the vector to operate on

Returns:T[]

Doc from org.apache.commons.math3.linear.FieldMatrix.operate.

this * v

Annotations
@Override
Exceptions
DimensionMismatchException:

Doc from org.apache.commons.math3.linear.FieldMatrix.operate.

if the number of columns of this matrix is not equal to the size of the vector v.

preMultiplyback to summary
public T[] preMultiply(final T[] v) throws DimensionMismatchException

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.preMultiply.

Implements org.apache.commons.math3.linear.FieldMatrix.preMultiply.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.preMultiply.

Returns the (row) vector result of premultiplying this by the vector v.

Parameters
v:T[]

Doc from org.apache.commons.math3.linear.FieldMatrix.preMultiply.

the row vector to premultiply by

Returns:T[]

Doc from org.apache.commons.math3.linear.FieldMatrix.preMultiply.

v * this

Annotations
@Override
Exceptions
DimensionMismatchException:

Doc from org.apache.commons.math3.linear.FieldMatrix.preMultiply.

if the number of rows of this matrix is not equal to the size of the vector v

setEntryback to summary
public void setEntry(final int row, final int column, final T value) throws OutOfRangeException

Implements abstract org.apache.commons.math3.linear.AbstractFieldMatrix.setEntry.

Implements org.apache.commons.math3.linear.FieldMatrix.setEntry.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.setEntry.

Set the entry in the specified row and column.

Parameters
row:int

Doc from org.apache.commons.math3.linear.FieldMatrix.setEntry.

row location of entry to be set

column:int

Doc from org.apache.commons.math3.linear.FieldMatrix.setEntry.

column location of entry to be set

value:T

Doc from org.apache.commons.math3.linear.FieldMatrix.setEntry.

matrix entry to be set in row,column

Annotations
@Override
Exceptions
OutOfRangeException:

Doc from org.apache.commons.math3.linear.FieldMatrix.setEntry.

if the row or column index is not valid.

setSubMatrixback to summary
public void setSubMatrix(final T[][] subMatrix, final int row, final int column) throws OutOfRangeException, NullArgumentException, NoDataException, DimensionMismatchException

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.setSubMatrix.

Implements org.apache.commons.math3.linear.FieldMatrix.setSubMatrix.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.setSubMatrix.

Replace the submatrix starting at (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  2
and 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

Parameters
subMatrix:T[][]

Doc from org.apache.commons.math3.linear.FieldMatrix.setSubMatrix.

Array containing the submatrix replacement data.

row:int

Doc from org.apache.commons.math3.linear.FieldMatrix.setSubMatrix.

Row coordinate of the top-left element to be replaced.

column:int

Doc from org.apache.commons.math3.linear.FieldMatrix.setSubMatrix.

Column coordinate of the top-left element to be replaced.

Annotations
@Override
Exceptions
OutOfRangeException:

Doc from org.apache.commons.math3.linear.FieldMatrix.setSubMatrix.

if subMatrix does not fit into this matrix from element in (row, column).

NullArgumentException:

Doc from org.apache.commons.math3.linear.FieldMatrix.setSubMatrix.

if subMatrix is null.

NoDataException:

Doc from org.apache.commons.math3.linear.FieldMatrix.setSubMatrix.

if a row or column of subMatrix is empty.

DimensionMismatchException:

Doc from org.apache.commons.math3.linear.FieldMatrix.setSubMatrix.

if subMatrix is not rectangular (not all rows have the same length).

subtractback to summary
public Array2DRowFieldMatrix<T> subtract(final Array2DRowFieldMatrix<T> m) throws MatrixDimensionMismatchException

Subtract m from this matrix.

Parameters
m:Array2DRowFieldMatrix<T>

Matrix to be subtracted.

Returns:Array2DRowFieldMatrix<T>

this + m.

Exceptions
MatrixDimensionMismatchException:
if m is not the same size as this matrix.
walkInColumnOrderback to summary
public T walkInColumnOrder(final FieldMatrixChangingVisitor<T> visitor)

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

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.

Parameters
visitor:FieldMatrixChangingVisitor<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

visitor used to process all matrix entries

Returns:T

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

the value returned by FieldMatrixChangingVisitor#end() at the end of the walk

Annotations
@Override
walkInColumnOrderback to summary
public T walkInColumnOrder(final FieldMatrixPreservingVisitor<T> visitor)

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

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.

Parameters
visitor:FieldMatrixPreservingVisitor<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

visitor used to process all matrix entries

Returns:T

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

the value returned by FieldMatrixPreservingVisitor#end() at the end of the walk

Annotations
@Override
walkInColumnOrderback to summary
public T walkInColumnOrder(final FieldMatrixChangingVisitor<T> visitor, final int startRow, final int endRow, final int startColumn, final int endColumn) throws OutOfRangeException, NumberIsTooSmallException

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Visit (and possibly change) some 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.

Parameters
visitor:FieldMatrixChangingVisitor<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

visitor used to process all matrix entries

startRow:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Initial row index

endRow:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Final row index (inclusive)

startColumn:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Initial column index

endColumn:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Final column index

Returns:T

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

the value returned by FieldMatrixChangingVisitor#end() at the end of the walk

Annotations
@Override
Exceptions
OutOfRangeException:

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

if the indices are not valid.

NumberIsTooSmallException:

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

if endRow < startRow or endColumn < startColumn.

walkInColumnOrderback to summary
public T walkInColumnOrder(final FieldMatrixPreservingVisitor<T> visitor, final int startRow, final int endRow, final int startColumn, final int endColumn) throws OutOfRangeException, NumberIsTooSmallException

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.walkInColumnOrder.

Visit (but don't change) some 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.

Parameters
visitor:FieldMatrixPreservingVisitor<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

visitor used to process all matrix entries

startRow:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Initial row index

endRow:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Final row index (inclusive)

startColumn:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Initial column index

endColumn:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

Final column index

Returns:T

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

the value returned by FieldMatrixPreservingVisitor#end() at the end of the walk

Annotations
@Override
Exceptions
OutOfRangeException:

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

if the indices are not valid.

NumberIsTooSmallException:

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInColumnOrder.

if endRow < startRow or endColumn < startColumn.

walkInRowOrderback to summary
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor)

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

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.

Parameters
visitor:FieldMatrixChangingVisitor<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

visitor used to process all matrix entries

Returns:T

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

the value returned by FieldMatrixChangingVisitor#end() at the end of the walk

Annotations
@Override
walkInRowOrderback to summary
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor)

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

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.

Parameters
visitor:FieldMatrixPreservingVisitor<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

visitor used to process all matrix entries

Returns:T

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

the value returned by FieldMatrixPreservingVisitor#end() at the end of the walk

Annotations
@Override
walkInRowOrderback to summary
public T walkInRowOrder(final FieldMatrixChangingVisitor<T> visitor, final int startRow, final int endRow, final int startColumn, final int endColumn) throws OutOfRangeException, NumberIsTooSmallException

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Visit (and possibly change) some 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.

Parameters
visitor:FieldMatrixChangingVisitor<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

visitor used to process all matrix entries

startRow:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Initial row index

endRow:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Final row index (inclusive)

startColumn:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Initial column index

endColumn:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Final column index

Returns:T

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

the value returned by FieldMatrixChangingVisitor#end() at the end of the walk

Annotations
@Override
Exceptions
OutOfRangeException:

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

if the indices are not valid.

NumberIsTooSmallException:

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

if endRow < startRow or endColumn < startColumn.

walkInRowOrderback to summary
public T walkInRowOrder(final FieldMatrixPreservingVisitor<T> visitor, final int startRow, final int endRow, final int startColumn, final int endColumn) throws OutOfRangeException, NumberIsTooSmallException

Overrides org.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Implements org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Doc from org.apache.commons.math3.linear.AbstractFieldMatrix.walkInRowOrder.

Visit (but don't change) some 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.

Parameters
visitor:FieldMatrixPreservingVisitor<T>

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

visitor used to process all matrix entries

startRow:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Initial row index

endRow:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Final row index (inclusive)

startColumn:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Initial column index

endColumn:int

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

Final column index

Returns:T

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

the value returned by FieldMatrixPreservingVisitor#end() at the end of the walk

Annotations
@Override
Exceptions
OutOfRangeException:

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

if the indices are not valid.

NumberIsTooSmallException:

Doc from org.apache.commons.math3.linear.FieldMatrix.walkInRowOrder.

if endRow < startRow or endColumn < startColumn.