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

public Class Array2DRowRealMatrix

extends AbstractRealMatrix
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, org.apache.commons.math3.exception.DimensionMismatchException, .MathIllegalStateException, .NoDataException, .NotStrictlyPositiveException, .NullArgumentException, .NumberIsTooSmallException, .OutOfRangeException, org.apache.commons.math3.exception.util.LocalizedFormats, org.apache.commons.math3.util.MathUtils

Implementation of RealMatrix using a double[][] array to store entries.

Field Summary

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

Entries of the matrix.

private static final long
serialVersionUID

Serializable version identifier.

Constructor Summary

AccessConstructor and Description
public
Array2DRowRealMatrix()

Creates a matrix with no data

public
Array2DRowRealMatrix(final int
Number of rows in the new matrix.
rowDimension
,
final int
Number of columns in the new matrix.
columnDimension
)

Create a new RealMatrix with the supplied row and column dimensions.

public
Array2DRowRealMatrix(final double[][]
Data for the new matrix.
d
)

Create a new RealMatrix using the input array as the underlying data array.

public
Array2DRowRealMatrix(final double[][]
Data for new matrix.
d
,
final boolean
if true, the input array will be copied, otherwise it will be referenced.
copyArray
)

Create a new RealMatrix using the input array as the underlying data array.

public
Array2DRowRealMatrix(final double[]
Column vector holding data for new matrix.
v
)

Create a new (column) RealMatrix using v as the data for the unique column of the created matrix.

Method Summary

Modifier and TypeMethod and Description
public Array2DRowRealMatrix

Returns:

this + m.
add
(final Array2DRowRealMatrix
Matrix to be added.
m
)

Compute the sum of this and m.

public void
addToEntry(final int
Row index of the entry to be modified.
row
,
final int
Column index of the entry to be modified.
column
,
final double
value to add to the matrix entry.
increment
)

Overrides org.apache.commons.math3.linear.AbstractRealMatrix.addToEntry.

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

Adds (in place) the specified value to the specified entry of this matrix.

public RealMatrix
private void
copyIn(final double[][]
Data to copy.
in
)

Replace data with a fresh copy of the input array.

private double[][]

Returns:

a copy of the underlying data array.
copyOut
()

Get a fresh copy of the underlying data array.

public RealMatrix
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.AbstractRealMatrix.createMatrix.

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

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

public int
public double[][]
getData()

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

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

Returns matrix entries as a two-dimensional array.

public double[][]

Returns:

2-dimensional array of entries.
getDataRef
()

Get a reference to the underlying data array.

public double
getEntry(final int
Row index of entry to be fetched.
row
,
final int
Column index of entry to be fetched.
column
)

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

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

Get the entry in the specified row and column.

public int
public Array2DRowRealMatrix

Returns:

this * m
multiply
(final Array2DRowRealMatrix
matrix to postmultiply by
m
)

Returns the result of postmultiplying this by m.

public void
multiplyEntry(final int
Row index of the entry to be modified.
row
,
final int
Column index of the entry to be modified.
column
,
final double
Multiplication factor for the matrix entry.
factor
)

Overrides org.apache.commons.math3.linear.AbstractRealMatrix.multiplyEntry.

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

Multiplies (in place) the specified entry of this matrix by the specified value.

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

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

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

Returns the result of multiplying this by the vector v.

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

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

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

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

public void
setEntry(final int
Row index of entry to be set.
row
,
final int
Column index of entry to be set.
column
,
final double
the new value of the entry.
value
)

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

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

Set the entry in the specified row and column.

public void
setSubMatrix(final double[][]
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.AbstractRealMatrix.setSubMatrix.

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

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

public Array2DRowRealMatrix

Returns:

this - m
subtract
(final Array2DRowRealMatrix
Matrix to be subtracted.
m
)

Returns this minus m.

public double
walkInColumnOrder(final RealMatrixChangingVisitor
visitor used to process all matrix entries
visitor
)

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

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

Visit (and possibly change) all matrix entries in column order.

public double
walkInColumnOrder(final RealMatrixPreservingVisitor
visitor used to process all matrix entries
visitor
)

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

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

Visit (but don't change) all matrix entries in column order.

public double
walkInColumnOrder(final RealMatrixChangingVisitor
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.AbstractRealMatrix.walkInColumnOrder.

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

Visit (and possibly change) some matrix entries in column order.

public double
walkInColumnOrder(final RealMatrixPreservingVisitor
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.AbstractRealMatrix.walkInColumnOrder.

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

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

public double
walkInRowOrder(final RealMatrixChangingVisitor
visitor used to process all matrix entries
visitor
)

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

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

Visit (and possibly change) all matrix entries in row order.

public double
walkInRowOrder(final RealMatrixPreservingVisitor
visitor used to process all matrix entries
visitor
)

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

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

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

public double
walkInRowOrder(final RealMatrixChangingVisitor
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.AbstractRealMatrix.walkInRowOrder.

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

Visit (and possibly change) some matrix entries in row order.

public double
walkInRowOrder(final RealMatrixPreservingVisitor
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.AbstractRealMatrix.walkInRowOrder.

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

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

Inherited from org.apache.commons.math3.linear.AbstractRealMatrix:
addcopySubMatrixcopySubMatrixequalsgetColumngetColumnMatrixgetColumnVectorgetFrobeniusNormgetNormgetRowgetRowMatrixgetRowVectorgetSubMatrixgetSubMatrixgetTracehashCodeisSquaremultiplyoperatepowerpreMultiplypreMultiplyscalarAddscalarMultiplysetColumnsetColumnMatrixsetColumnVectorsetRowsetRowMatrixsetRowVectorsubtracttoStringtransposewalkInOptimizedOrderwalkInOptimizedOrderwalkInOptimizedOrderwalkInOptimizedOrder

Field Detail

databack to summary
private double[][] data

Entries of the matrix.

serialVersionUIDback to summary
private static final long serialVersionUID

Serializable version identifier.

Constructor Detail

Array2DRowRealMatrixback to summary
public Array2DRowRealMatrix()

Creates a matrix with no data

Array2DRowRealMatrixback to summary
public Array2DRowRealMatrix(final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException

Create a new RealMatrix with the supplied row and column dimensions.

Parameters
rowDimension:int

Number of rows in the new matrix.

columnDimension:int

Number of columns in the new matrix.

Exceptions
NotStrictlyPositiveException:
if the row or column dimension is not positive.
Array2DRowRealMatrixback to summary
public Array2DRowRealMatrix(final double[][] d) throws DimensionMismatchException, NoDataException, NullArgumentException

Create a new RealMatrix using the input array as the underlying data array.

The input array is copied, not referenced. This constructor has the same effect as calling Array2DRowRealMatrix(double[][], boolean) with the second argument set to true.

Parameters
d:double[][]

Data for the new matrix.

Exceptions
DimensionMismatchException:
if d is not rectangular.
NoDataException:
if d row or column dimension is zero.
NullArgumentException:
if d is null.
See Also
Array2DRowRealMatrix(double[][], boolean)
Array2DRowRealMatrixback to summary
public Array2DRowRealMatrix(final double[][] d, final boolean copyArray) throws DimensionMismatchException, NoDataException, NullArgumentException

Create a new RealMatrix using the input array as the underlying data array. If an array is built specially in order to be embedded in a RealMatrix 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:double[][]

Data for new matrix.

copyArray:boolean

if true, the input array will be copied, otherwise it will be referenced.

Exceptions
DimensionMismatchException:
if d is not rectangular.
NoDataException:
if d row or column dimension is zero.
NullArgumentException:
if d is null.
See Also
Array2DRowRealMatrix(double[][])
Array2DRowRealMatrixback to summary
public Array2DRowRealMatrix(final double[] v)

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

Parameters
v:double[]

Column vector holding data for new matrix.

Method Detail

addback to summary
public Array2DRowRealMatrix add(final Array2DRowRealMatrix m) throws MatrixDimensionMismatchException

Compute the sum of this and m.

Parameters
m:Array2DRowRealMatrix

Matrix to be added.

Returns:Array2DRowRealMatrix

this + m.

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

Overrides org.apache.commons.math3.linear.AbstractRealMatrix.addToEntry.

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

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

Adds (in place) the specified value to the specified entry of this matrix. Row and column indices start at 0.

Parameters
row:int

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

Row index of the entry to be modified.

column:int

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

Column index of the entry to be modified.

increment:double

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

value to add to the matrix entry.

Annotations
@Override
Exceptions
OutOfRangeException:

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

if the row or column index is not valid.

copyback to summary
public RealMatrix copy()

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

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

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

Returns a (deep) copy of this.

Returns:RealMatrix

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

matrix copy

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

Replace data with a fresh copy of the input array.

Parameters
in:double[][]

Data to copy.

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

Get a fresh copy of the underlying data array.

Returns:double[][]

a copy of the underlying data array.

createMatrixback to summary
public RealMatrix createMatrix(final int rowDimension, final int columnDimension) throws NotStrictlyPositiveException

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

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

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

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

Parameters
rowDimension:int

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

the number of rows in the new matrix

columnDimension:int

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

the number of columns in the new matrix

Returns:RealMatrix

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

a new matrix of the same type as the instance

Annotations
@Override
Exceptions
NotStrictlyPositiveException:

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

if row or column dimension is not positive.

getColumnDimensionback to summary
public int getColumnDimension()

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

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

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

Returns the number of columns of this matrix.

Returns:int

the number of columns.

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

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

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

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

Returns matrix entries as a two-dimensional array.

Returns:double[][]

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

2-dimensional array of entries

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

Get a reference to the underlying data array.

Returns:double[][]

2-dimensional array of entries.

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

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

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

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

Get the entry in the specified row and column. Row and column indices start at 0.

Parameters
row:int

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

Row index of entry to be fetched.

column:int

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

Column index of entry to be fetched.

Returns:double

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

the matrix entry at (row, column).

Annotations
@Override
Exceptions
OutOfRangeException:

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

if the row or column index is not valid.

getRowDimensionback to summary
public int getRowDimension()

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

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

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

Returns the number of rows of this matrix.

Returns:int

the number of rows.

Annotations
@Override
multiplyback to summary
public Array2DRowRealMatrix multiply(final Array2DRowRealMatrix m) throws DimensionMismatchException

Returns the result of postmultiplying this by m.

Parameters
m:Array2DRowRealMatrix

matrix to postmultiply by

Returns:Array2DRowRealMatrix

this * m

Exceptions
DimensionMismatchException:
if columnDimension(this) != rowDimension(m)
multiplyEntryback to summary
public void multiplyEntry(final int row, final int column, final double factor) throws OutOfRangeException

Overrides org.apache.commons.math3.linear.AbstractRealMatrix.multiplyEntry.

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

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

Multiplies (in place) the specified entry of this matrix by the specified value. Row and column indices start at 0.

Parameters
row:int

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

Row index of the entry to be modified.

column:int

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

Column index of the entry to be modified.

factor:double

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

Multiplication factor for the matrix entry.

Annotations
@Override
Exceptions
OutOfRangeException:

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

if the row or column index is not valid.

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

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

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

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

Returns the result of multiplying this by the vector v.

Parameters
v:double[]

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

the vector to operate on

Returns:double[]

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

this * v

Annotations
@Override
Exceptions
DimensionMismatchException:

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

if the length of v does not match the column dimension of this.

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

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

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

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

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

Parameters
v:double[]

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

the row vector to premultiply by

Returns:double[]

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

v * this

Annotations
@Override
Exceptions
DimensionMismatchException:

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

if the length of v does not match the row dimension of this.

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

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

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

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

Set the entry in the specified row and column. Row and column indices start at 0.

Parameters
row:int

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

Row index of entry to be set.

column:int

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

Column index of entry to be set.

value:double

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

the new value of the entry.

Annotations
@Override
Exceptions
OutOfRangeException:

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

if the row or column index is not valid

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

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

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

Doc from org.apache.commons.math3.linear.AbstractRealMatrix.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:double[][]

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

array containing the submatrix replacement data

row:int

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

row coordinate of the top, left element to be replaced

column:int

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

column coordinate of the top, left element to be replaced

Annotations
@Override
Exceptions
NoDataException:

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

if subMatrix is empty.

OutOfRangeException:

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

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

DimensionMismatchException:

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

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

NullArgumentException:

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

if subMatrix is null.

subtractback to summary
public Array2DRowRealMatrix subtract(final Array2DRowRealMatrix m) throws MatrixDimensionMismatchException

Returns this minus m.

Parameters
m:Array2DRowRealMatrix

Matrix to be subtracted.

Returns:Array2DRowRealMatrix

this - m

Exceptions
MatrixDimensionMismatchException:
if m is not the same size as this.
walkInColumnOrderback to summary
public double walkInColumnOrder(final RealMatrixChangingVisitor visitor)

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

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

Doc from org.apache.commons.math3.linear.AbstractRealMatrix.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:RealMatrixChangingVisitor

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

visitor used to process all matrix entries

Returns:double

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

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

Annotations
@Override
walkInColumnOrderback to summary
public double walkInColumnOrder(final RealMatrixPreservingVisitor visitor)

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

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

Doc from org.apache.commons.math3.linear.AbstractRealMatrix.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:RealMatrixPreservingVisitor

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

visitor used to process all matrix entries

Returns:double

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

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

Annotations
@Override
walkInColumnOrderback to summary
public double walkInColumnOrder(final RealMatrixChangingVisitor visitor, final int startRow, final int endRow, final int startColumn, final int endColumn) throws OutOfRangeException, NumberIsTooSmallException

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

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

Doc from org.apache.commons.math3.linear.AbstractRealMatrix.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:RealMatrixChangingVisitor

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

visitor used to process all matrix entries

startRow:int

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

Initial row index

endRow:int

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

Final row index (inclusive)

startColumn:int

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

Initial column index

endColumn:int

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

Final column index

Returns:double

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

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

Annotations
@Override
Exceptions
OutOfRangeException:

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

if the indices are not valid.

NumberIsTooSmallException:

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

if endRow < startRow or endColumn < startColumn.

walkInColumnOrderback to summary
public double walkInColumnOrder(final RealMatrixPreservingVisitor visitor, final int startRow, final int endRow, final int startColumn, final int endColumn) throws OutOfRangeException, NumberIsTooSmallException

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

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

Doc from org.apache.commons.math3.linear.AbstractRealMatrix.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:RealMatrixPreservingVisitor

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

visitor used to process all matrix entries

startRow:int

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

Initial row index

endRow:int

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

Final row index (inclusive)

startColumn:int

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

Initial column index

endColumn:int

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

Final column index

Returns:double

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

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

Annotations
@Override
Exceptions
OutOfRangeException:

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

if the indices are not valid.

NumberIsTooSmallException:

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

if endRow < startRow or endColumn < startColumn.

walkInRowOrderback to summary
public double walkInRowOrder(final RealMatrixChangingVisitor visitor)

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

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

Doc from org.apache.commons.math3.linear.AbstractRealMatrix.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:RealMatrixChangingVisitor

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

visitor used to process all matrix entries

Returns:double

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

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

Annotations
@Override
walkInRowOrderback to summary
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor)

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

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

Doc from org.apache.commons.math3.linear.AbstractRealMatrix.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:RealMatrixPreservingVisitor

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

visitor used to process all matrix entries

Returns:double

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

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

Annotations
@Override
walkInRowOrderback to summary
public double walkInRowOrder(final RealMatrixChangingVisitor visitor, final int startRow, final int endRow, final int startColumn, final int endColumn) throws OutOfRangeException, NumberIsTooSmallException

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

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

Doc from org.apache.commons.math3.linear.AbstractRealMatrix.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:RealMatrixChangingVisitor

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

visitor used to process all matrix entries

startRow:int

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

Initial row index

endRow:int

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

Final row index (inclusive)

startColumn:int

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

Initial column index

endColumn:int

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

Final column index

Returns:double

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

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

Annotations
@Override
Exceptions
OutOfRangeException:

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

if the indices are not valid.

NumberIsTooSmallException:

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

if endRow < startRow or endColumn < startColumn.

walkInRowOrderback to summary
public double walkInRowOrder(final RealMatrixPreservingVisitor visitor, final int startRow, final int endRow, final int startColumn, final int endColumn) throws OutOfRangeException, NumberIsTooSmallException

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

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

Doc from org.apache.commons.math3.linear.AbstractRealMatrix.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:RealMatrixPreservingVisitor

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

visitor used to process all matrix entries

startRow:int

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

Initial row index

endRow:int

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

Final row index (inclusive)

startColumn:int

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

Initial column index

endColumn:int

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

Final column index

Returns:double

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

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

Annotations
@Override
Exceptions
OutOfRangeException:

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

if the indices are not valid.

NumberIsTooSmallException:

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

if endRow < startRow or endColumn < startColumn.