public class BlockRealMatrix extends AbstractRealMatrix
This implementation is specially designed to be cache-friendly. Square blocks are stored as small arrays and allow efficient traversal of data both in row major direction and columns major direction, one block at a time. This greatly increases performances for algorithms that use crossed directions loops like multiplication or transposition.
The size of square blocks is a static parameter. It may be tuned according to the cache size of the target computer processor. As a rule of thumbs, it should be the largest value that allows three blocks to be simultaneously cached (this is necessary for example for matrix multiplication). The default value is to use 52x52 blocks which is well suited for processors with 64k L1 cache (one block holds 2704 values or 21632 bytes). This value could be lowered to 36x36 for processors with 32k L1 cache.
The regular blocks represent BLOCK_SIZE x BLOCK_SIZE squares. Blocks at right hand side and bottom
side which may be smaller to fit matrix dimensions. The square blocks are flattened in row major order in single
dimension arrays which are therefore BLOCK_SIZE2 elements long for regular blocks. The blocks are
themselves organized in row major order.
As an example, for a block size of 52x52, a 100x60 matrix would be stored in 4 blocks. Block 0 would be a double[2704] array holding the upper left 52x52 square, block 1 would be a double[416] array holding the upper right 52x8 rectangle, block 2 would be a double[2496] array holding the lower left 48x52 rectangle and block 3 would be a double[384] array holding the lower right 48x8 rectangle.
The layout complexity overhead versus simple mapping of matrices to java arrays is negligible for small matrices (about 1%). The gain from cache efficiency leads to up to 3-fold improvements for matrices of moderate to large size.
| Modifier and Type | Field and Description |
|---|---|
static int |
BLOCK_SIZE
Block size.
|
| Constructor and Description |
|---|
BlockRealMatrix(double[][] rawData)
Create a new dense matrix copying entries from raw layout data.
|
BlockRealMatrix(int rowsIn,
int columnsIn)
Create a new matrix with the supplied row and column dimensions.
|
BlockRealMatrix(int rowsIn,
int columnsIn,
double[][] blockData,
boolean copyArray)
Create a new dense matrix copying entries from block layout data.
|
| Modifier and Type | Method and Description |
|---|---|
BlockRealMatrix |
add(BlockRealMatrix m)
Compute the sum of this matrix and
m. |
BlockRealMatrix |
add(RealMatrix m)
Returns the result of adding the matrix
m to this matrix. |
void |
addToEntry(int row,
int column,
double increment)
Adds (in place) a given value to the specified entry of this matrix.
|
BlockRealMatrix |
copy()
Returns a deep copy of this matrix.
|
static double[][] |
createBlocksLayout(int rows,
int columns)
Create a data array in blocks layout.
|
BlockRealMatrix |
createMatrix(int rowDimension,
int columnDimension)
Creates a new matrix of the same type as this matrix.
|
double[] |
getColumn(int column)
Gets the entries of a given column.
|
int |
getColumnDimension()
Returns the dimension of the domain of this operator.
|
BlockRealMatrix |
getColumnMatrix(int column)
Gets the entries of a given column as a column matrix.
|
RealVector |
getColumnVector(int column)
Gets the entries of a given column as a vector.
|
double[][] |
getData()
Returns a 2D array containing the entries of the matrix.
|
double |
getEntry(int row,
int column)
Gets the entry at the specified row and column.
|
double |
getFrobeniusNorm()
Returns the Frobenius norm of
the matrix.
|
double |
getNorm()
Returns the maximum
absolute row sum norm of the matrix.
|
double[] |
getRow(int row)
Gets the entries of a given row.
|
int |
getRowDimension()
Returns the dimension of the codomain of this operator.
|
BlockRealMatrix |
getRowMatrix(int row)
Gets the entries of a given row as a row matrix.
|
RealVector |
getRowVector(int row)
Gets the entries of a given row as a vector.
|
BlockRealMatrix |
getSubMatrix(int startRow,
int endRow,
int startColumn,
int endColumn)
Gets a submatrix.
|
BlockRealMatrix |
multiply(BlockRealMatrix m)
Returns the result of postmultiplying
this by m. |
BlockRealMatrix |
multiply(BlockRealMatrix m,
boolean toTranspose)
Returns the result of postmultiplying this × m (if
toTranspose = false)
or this × mT (if toTranspose = true) |
BlockRealMatrix |
multiply(BlockRealMatrix m,
boolean toTranspose,
double d)
Returns the result of postmultiplying d × this × m (if
toTranspose = false
) or d × this × mT (if toTranspose = true) |
RealMatrix |
multiply(RealMatrix m,
boolean toTranspose,
double d)
Returns the result of postmultiplying this matrix by the matrix
m or its transpose
mT, then by the scalar d. |
void |
multiplyEntry(int row,
int column,
double factor)
Multiplies (in place) the specified entry of
this matrix by a given value. |
double[] |
operate(double[] v)
Returns the result of postmultiplying this matrix by the vector
v. |
double[] |
preMultiply(double[] v)
Returns the result of premultiplying this matrix by the vector
v. |
BlockRealMatrix |
scalarAdd(double d)
Returns the result of adding a scalar
d to the entries of this matrix. |
BlockRealMatrix |
scalarMultiply(double d)
Returns the result of multiplying the entries of this matrix by the scalar
d. |
void |
setColumn(int column,
double[] array)
Replaces the entries of a given column with the entries of the specified data array.
|
void |
setColumnMatrix(int column,
BlockRealMatrix matrix)
Sets the entries in column number
column as a column matrix. |
void |
setColumnMatrix(int column,
RealMatrix matrix)
Replaces the entries of a given column with the entries of the specified column matrix.
|
void |
setColumnVector(int column,
RealVector vector)
Replaces the entries of a given column with the entries of the specified vector.
|
void |
setEntry(int row,
int column,
double value)
Sets the entry at the specified row and column to a new value.
|
void |
setRow(int row,
double[] array)
Replaces the entries of a given row with the entries of the specified data array.
|
void |
setRowMatrix(int row,
BlockRealMatrix matrix)
Sets the entries in row number
row as a row matrix. |
void |
setRowMatrix(int row,
RealMatrix matrix)
Replaces the entries of a given row with the entries of the specified row matrix.
|
void |
setRowVector(int row,
RealVector vector)
Replaces the entries of a given row with the entries of the specified vector.
|
void |
setSubMatrix(double[][] subMatrix,
int row,
int column)
Replaces part of the matrix with a given submatrix, starting at the specified row and column.
|
BlockRealMatrix |
subtract(BlockRealMatrix m)
Subtract
m from this matrix. |
BlockRealMatrix |
subtract(RealMatrix m)
Returns the result of subtracting the matrix
m from this matrix. |
static double[][] |
toBlocksLayout(double[][] rawData)
Convert a data array from raw layout to blocks layout.
|
BlockRealMatrix |
transpose()
Returns the transpose of this matrix.
|
double |
walkInOptimizedOrder(RealMatrixChangingVisitor visitor)
Visits (and possibly change) all matrix entries using the fastest possible order.
|
double |
walkInOptimizedOrder(RealMatrixChangingVisitor visitor,
int startRow,
int endRow,
int startColumn,
int endColumn)
Visits (and possibly change) some matrix entries using the fastest possible order.
|
double |
walkInOptimizedOrder(RealMatrixPreservingVisitor visitor)
Visits (but don't change) all matrix entries using the fastest possible order.
|
double |
walkInOptimizedOrder(RealMatrixPreservingVisitor visitor,
int startRow,
int endRow,
int startColumn,
int endColumn)
Visits (but don't change) some matrix entries using the fastest possible order.
|
double |
walkInRowOrder(RealMatrixChangingVisitor visitor)
Visits (and possibly change) all matrix entries in row order.
|
double |
walkInRowOrder(RealMatrixChangingVisitor visitor,
int startRow,
int endRow,
int startColumn,
int endColumn)
Visits (and possibly change) some matrix entries in row order.
|
double |
walkInRowOrder(RealMatrixPreservingVisitor visitor)
Visits (but don't change) all matrix entries in row order.
|
double |
walkInRowOrder(RealMatrixPreservingVisitor visitor,
int startRow,
int endRow,
int startColumn,
int endColumn)
Visits (but don't change) some matrix entries in row order.
|
checkDestinationArray, checkSquare, concatenateDiagonally, concatenateDiagonally, concatenateDiagonally, concatenateHorizontally, concatenateHorizontally, concatenateVertically, concatenateVertically, copySubMatrix, copySubMatrix, copySubMatrix, copySubMatrix, equals, equals, getAbs, getData, getDefaultDecomposition, getDiagonal, getInverse, getInverse, getMax, getMin, getSubMatrix, getTrace, hashCode, isAntisymmetric, isDiagonal, isInvertible, isOrthogonal, isSquare, isSymmetric, isSymmetric, isSymmetric, multiply, multiply, multiply, operate, power, preMultiply, preMultiply, setDefaultDecomposition, toString, toString, transpose, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInColumnOrderisTransposable, operateTransposeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMax, getMinpublic static final int BLOCK_SIZE
public BlockRealMatrix(int rowsIn,
int columnsIn)
rowsIn - the number of rows in the new matrixcolumnsIn - the number of columns in the new matrixNotStrictlyPositiveException - if row or column dimension is not
positive.public BlockRealMatrix(double[][] rawData)
The input array must already be in raw layout.
Calling this constructor is equivalent to call:
matrix = new BlockRealMatrix(rawData.length, rawData[0].length,
toBlocksLayout(rawData), false);
rawData - data for new matrix, in raw layoutDimensionMismatchException - if the shape of blockData is
inconsistent with block layout.NotStrictlyPositiveException - if row or column dimension is not
positive.BlockRealMatrix(int, int, double[][], boolean)public BlockRealMatrix(int rowsIn,
int columnsIn,
double[][] blockData,
boolean copyArray)
The input array must already be in blocks layout.
rowsIn - Number of rows in the new matrix.columnsIn - Number of columns in the new matrix.blockData - data for new matrixcopyArray - Whether the input array will be copied or referenced.DimensionMismatchException - if the shape of blockData is
inconsistent with block layout.NotStrictlyPositiveException - if row or column dimension is not
positive.createBlocksLayout(int, int),
toBlocksLayout(double[][]),
BlockRealMatrix(double[][])public static double[][] toBlocksLayout(double[][] rawData)
Raw layout is the straightforward layout where element at row i and column j is in array element
rawData[i][j]. Blocks layout is the layout used in BlockRealMatrix instances, where the
matrix is split in square blocks (except at right and bottom side where blocks may be rectangular to fit matrix
size) and each block is stored in a flattened one-dimensional array.
This method creates an array in blocks layout from an input array in raw layout. It can be used to provide the
array argument of the BlockRealMatrix(int, int, double[][], boolean) constructor.
rawData - Data array in raw layout.DimensionMismatchException - if rawData is not rectangular.createBlocksLayout(int, int),
BlockRealMatrix(int, int, double[][], boolean)public static double[][] createBlocksLayout(int rows,
int columns)
This method can be used to create the array argument of the
BlockRealMatrix(int, int, double[][], boolean) constructor.
rows - Number of rows in the new matrix.columns - Number of columns in the new matrix.toBlocksLayout(double[][]),
BlockRealMatrix(int, int, double[][], boolean)public BlockRealMatrix createMatrix(int rowDimension, int columnDimension)
The returned matrix is filled with zeros. Its size is determined by the specified row and column dimensions, which must both be strictly positive. Additional constraints on the dimensions may apply depending on the implementation (for example, symmetric matrices must be square, which implies that the row and column dimensions must be equal).
createMatrix in interface RealMatrixcreateMatrix in class AbstractRealMatrixrowDimension - the number of rows in the new matrixcolumnDimension - the number of columns in the new matrixpublic BlockRealMatrix copy()
copy in interface RealMatrixcopy in class AbstractRealMatrixpublic BlockRealMatrix add(RealMatrix m)
m to this matrix.add in interface RealMatrixadd in class AbstractRealMatrixm - the matrix to be addedthis+mpublic BlockRealMatrix add(BlockRealMatrix m)
m.m - Matrix to be added.this + m.MatrixDimensionMismatchException - if m is not the same
size as this matrix.public BlockRealMatrix subtract(RealMatrix m)
m from this matrix.subtract in interface RealMatrixsubtract in class AbstractRealMatrixm - the matrix to be subtractedthis-mpublic BlockRealMatrix subtract(BlockRealMatrix m)
m from this matrix.m - Matrix to be subtracted.this - m.MatrixDimensionMismatchException - if m is not the
same size as this matrix.public BlockRealMatrix scalarAdd(double d)
d to the entries of this matrix.scalarAdd in interface RealMatrixscalarAdd in class AbstractRealMatrixd - the scalar value to be added to the entries of this matrixthis+dpublic BlockRealMatrix scalarMultiply(double d)
d.scalarMultiply in interface RealMatrixscalarMultiply in class AbstractRealMatrixd - the scalar value by which to multiply the entries of this matrix bythis×dpublic RealMatrix multiply(RealMatrix m, boolean toTranspose, double d)
m or its transpose
mT, then by the scalar d.multiply in interface RealMatrixmultiply in class AbstractRealMatrixm - the matrix by which to multiply this matrix bytoTranspose - whether to compute the product this×m×d (
toTranspose=false), or the product this×m
T×d (toTranspose=true)d - the scalar by which to multiply the resulting matrix bythis×m×d or
this×mT×dpublic BlockRealMatrix multiply(BlockRealMatrix m)
this by m.m - matrix to postmultiply bythis * mDimensionMismatchException - if matrices are not multiplication compatiblepublic BlockRealMatrix multiply(BlockRealMatrix m, boolean toTranspose)
toTranspose = false)
or this × mT (if toTranspose = true)m - matrix to postmultiply bytoTranspose - indication value, true if we expect the m matrix to be transposedDimensionMismatchException - if matrices are not multiplication compatiblepublic BlockRealMatrix multiply(BlockRealMatrix m, boolean toTranspose, double d)
toTranspose = false
) or d × this × mT (if toTranspose = true)m - matrix to postmultiply bytoTranspose - indication value, true if we expect the m matrix to be transposedd - value to multiply all entries byDimensionMismatchException - if matrices are not multiplication compatiblepublic double[][] getData()
getData in interface RealMatrixgetData in class AbstractRealMatrixpublic double getNorm()
getNorm in interface RealMatrixgetNorm in class AbstractRealMatrixpublic double getFrobeniusNorm()
getFrobeniusNorm in interface RealMatrixgetFrobeniusNorm in class AbstractRealMatrixpublic BlockRealMatrix getSubMatrix(int startRow, int endRow, int startColumn, int endColumn)
Rows and columns are indicated counting from 0 to n-1.
getSubMatrix in interface RealMatrixgetSubMatrix in class AbstractRealMatrixstartRow - the initial row indexendRow - the final row index (inclusive)startColumn - the initial column indexendColumn - the final column index (inclusive)public void setSubMatrix(double[][] subMatrix,
int row,
int column)
Rows and columns are indicated counting from 0 to n-1.
Usage example:
// Initial matrix
matrix = [a00, a10, a20]
[a10, a11, a21]
[a20, a21, a22]
// Submatrix
subMatrix = [b00, b01]
[b10, b11]
// Replace part of the initial matrix
matrix.setSubMatrix(subMatrix, 1, 1) =>[a00, a10, a20]
[a10, b00, b01]
[a20, b10, b11]
setSubMatrix in interface RealMatrixsetSubMatrix in class AbstractRealMatrixsubMatrix - the array containing the submatrix replacement datarow - the row coordinate of the top, left element to be replacedcolumn - the column coordinate of the top, left element to be replacedpublic BlockRealMatrix getRowMatrix(int row)
Row indices start at 0.
getRowMatrix in interface RealMatrixgetRowMatrix in class AbstractRealMatrixrow - the index of the row to be fetchedpublic void setRowMatrix(int row,
RealMatrix matrix)
Row indices start at 0.
The provided matrix must have one row and the same number of columns as this matrix.
setRowMatrix in interface RealMatrixsetRowMatrix in class AbstractRealMatrixrow - the index of the row to be replacedmatrix - the row matrix to be copiedpublic void setRowMatrix(int row,
BlockRealMatrix matrix)
row as a row matrix. Row indices start at 0.row - the row to be setmatrix - row matrix (must have one row and the same number of columns
as the instance)OutOfRangeException - if the specified row index is invalid.MatrixDimensionMismatchException - if the matrix dimensions do
not match one instance row.public BlockRealMatrix getColumnMatrix(int column)
Column indices start at 0.
getColumnMatrix in interface RealMatrixgetColumnMatrix in class AbstractRealMatrixcolumn - the index of the column to be fetchedpublic void setColumnMatrix(int column,
RealMatrix matrix)
Column indices start at 0.
The provided matrix must have one column and the same number of rows as this matrix.
setColumnMatrix in interface RealMatrixsetColumnMatrix in class AbstractRealMatrixcolumn - the index of the column to be replacedmatrix - the column matrix to be copiedpublic void setColumnMatrix(int column,
BlockRealMatrix matrix)
column as a column matrix. Column indices start at 0.column - the column to be setmatrix - column matrix (must have one column and the same number of rows
as the instance)OutOfRangeException - if the specified column index is invalid.MatrixDimensionMismatchException - if the matrix dimensions do
not match one instance column.public RealVector getRowVector(int row)
Row indices start at 0.
getRowVector in interface RealMatrixgetRowVector in class AbstractRealMatrixrow - the index of the row to be fetchedpublic void setRowVector(int row,
RealVector vector)
Row indices start at 0.
The size of the provided vector must match the column dimension of this matrix.
setRowVector in interface RealMatrixsetRowVector in class AbstractRealMatrixrow - the index of the row to be replacedvector - the row vector to be copiedpublic RealVector getColumnVector(int column)
Column indices start at 0.
getColumnVector in interface RealMatrixgetColumnVector in class AbstractRealMatrixcolumn - the index of the column to be fetchedpublic void setColumnVector(int column,
RealVector vector)
Column indices start at 0.
The size of the provided vector must match the row dimension of this matrix.
setColumnVector in interface RealMatrixsetColumnVector in class AbstractRealMatrixcolumn - the index of the column to be replacedvector - the column vector to be copiedpublic double[] getRow(int row)
Row indices start at 0.
getRow in interface RealMatrixgetRow in class AbstractRealMatrixrow - the index of the row to be fetchedpublic void setRow(int row,
double[] array)
Row indices start at 0.
The size of the provided data array must match the column dimension of this matrix.
setRow in interface RealMatrixsetRow in class AbstractRealMatrixrow - the index of the row to be replacedarray - the row data array to be copiedpublic double[] getColumn(int column)
Column indices start at 0.
getColumn in interface RealMatrixgetColumn in class AbstractRealMatrixcolumn - the index of the column to be fetchedpublic void setColumn(int column,
double[] array)
Column indices start at 0.
The size of the provided data array must match the row dimension of this matrix.
setColumn in interface RealMatrixsetColumn in class AbstractRealMatrixcolumn - the index of the column to be replacedarray - the column data array to be copiedpublic double getEntry(int row,
int column)
Row and column indices start at 0.
getEntry in interface RealMatrixgetEntry in class AbstractRealMatrixrow - the row index of entry to be fetchedcolumn - the column index of entry to be fetchedpublic void setEntry(int row,
int column,
double value)
Row and column indices start at 0.
setEntry in interface RealMatrixsetEntry in class AbstractRealMatrixrow - the row index of entry to be setcolumn - the column index of entry to be setvalue - the new value of the entrypublic void addToEntry(int row,
int column,
double increment)
Row and column indices start at 0.
addToEntry in interface RealMatrixaddToEntry in class AbstractRealMatrixrow - the row index of the entry to be modifiedcolumn - the column index of the entry to be modifiedincrement - the value to add to the matrix entrypublic void multiplyEntry(int row,
int column,
double factor)
this matrix by a given value.
Row and column indices start at 0.
multiplyEntry in interface RealMatrixmultiplyEntry in class AbstractRealMatrixrow - the row index of the entry to be modifiedcolumn - the column index of the entry to be modifiedfactor - the multiplication factor for the matrix entrypublic BlockRealMatrix transpose()
transpose in interface RealMatrixtranspose in class AbstractRealMatrixpublic int getRowDimension()
getRowDimension in interface AnyMatrixgetRowDimension in class AbstractRealMatrixpublic int getColumnDimension()
getColumnDimension in interface AnyMatrixgetColumnDimension in class AbstractRealMatrixpublic double[] operate(double[] v)
v.operate in interface RealMatrixoperate in class AbstractRealMatrixv - the vector by which to multiply this matrix bythis×vpublic double[] preMultiply(double[] v)
v.preMultiply in interface RealMatrixpreMultiply in class AbstractRealMatrixv - the row vector by which to premultiply this matrix byv×thispublic double walkInRowOrder(RealMatrixChangingVisitor visitor)
Row order starts at upper left element, iterating through all elements of a row from left to right before going to the leftmost element of the next row.
walkInRowOrder in interface RealMatrixwalkInRowOrder in class AbstractRealMatrixvisitor - the visitor used to process all matrix entriesRealMatrixChangingVisitor.end() at the end of the walkRealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInRowOrder(RealMatrixPreservingVisitor visitor)
Row order starts at upper left element, iterating through all elements of a row from left to right before going to the leftmost element of the next row.
walkInRowOrder in interface RealMatrixwalkInRowOrder in class AbstractRealMatrixvisitor - the visitor used to process all matrix entriesRealMatrixPreservingVisitor.end() at the end of the
walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInRowOrder(RealMatrixChangingVisitor visitor, int startRow, int endRow, int startColumn, int endColumn)
Row order starts at upper left element, iterating through all elements of a row from left to right before going to the leftmost element of the next row.
walkInRowOrder in interface RealMatrixwalkInRowOrder in class AbstractRealMatrixvisitor - the visitor used to process all matrix entriesstartRow - the initial row indexendRow - the final row index (inclusive)startColumn - the initial column indexendColumn - the final column indexRealMatrixChangingVisitor.end() at the end of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInRowOrder(RealMatrixPreservingVisitor visitor, int startRow, int endRow, int startColumn, int endColumn)
Row order starts at upper left element, iterating through all elements of a row from left to right before going to the leftmost element of the next row.
walkInRowOrder in interface RealMatrixwalkInRowOrder in class AbstractRealMatrixvisitor - the visitor used to process all matrix entriesstartRow - the initial row indexendRow - the final row index (inclusive)startColumn - the initial column indexendColumn - the final column indexRealMatrixPreservingVisitor.end() at the end of the
walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInOptimizedOrder(RealMatrixChangingVisitor visitor)
The fastest walking order depends on the exact matrix class. It may be different from traditional row or column orders.
walkInOptimizedOrder in interface RealMatrixwalkInOptimizedOrder in class AbstractRealMatrixvisitor - the visitor used to process all matrix entriesRealMatrixChangingVisitor.end() at the end of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInOptimizedOrder(RealMatrixPreservingVisitor visitor)
The fastest walking order depends on the exact matrix class. It may be different from traditional row or column orders.
walkInOptimizedOrder in interface RealMatrixwalkInOptimizedOrder in class AbstractRealMatrixvisitor - the visitor used to process all matrix entriesRealMatrixPreservingVisitor.end() at the end of the
walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInOptimizedOrder(RealMatrixChangingVisitor visitor, int startRow, int endRow, int startColumn, int endColumn)
The fastest walking order depends on the exact matrix class. It may be different from traditional row or column orders.
walkInOptimizedOrder in interface RealMatrixwalkInOptimizedOrder in class AbstractRealMatrixvisitor - the visitor used to process all matrix entriesstartRow - the initial row indexendRow - the final row index (inclusive)startColumn - the initial column indexendColumn - the final column index (inclusive)RealMatrixChangingVisitor.end() at the end of the walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor, int, int, int, int)public double walkInOptimizedOrder(RealMatrixPreservingVisitor visitor, int startRow, int endRow, int startColumn, int endColumn)
The fastest walking order depends on the exact matrix class. It may be different from traditional row or column orders.
walkInOptimizedOrder in interface RealMatrixwalkInOptimizedOrder in class AbstractRealMatrixvisitor - the visitor used to process all matrix entriesstartRow - the initial row indexendRow - the final row index (inclusive)startColumn - the initial column indexendColumn - the final column index (inclusive)RealMatrixPreservingVisitor.end() at the end of the
walkRealMatrix.walkInRowOrder(RealMatrixChangingVisitor),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInRowOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInRowOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInColumnOrder(RealMatrixChangingVisitor, int, int, int, int),
RealMatrix.walkInColumnOrder(RealMatrixPreservingVisitor, int, int, int, int),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixPreservingVisitor),
RealMatrix.walkInOptimizedOrder(RealMatrixChangingVisitor, int, int, int, int)Copyright © 2025 CNES. All rights reserved.