public abstract class MutableAbstractMatrix extends AbstractMatrix implements MutableMatrix
AbstractMatrix
.buffer, columns, rows, zeroPadded
Constructor and Description |
---|
MutableAbstractMatrix() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
allocate(MatrixBackingBuffer buffer)
Calls
MatrixBackingBuffer.allocate(int) on the used buffer. |
void |
copy(float[] values)
Copies values from the provided array row by row to this matrix.
|
void |
copy(Matrix fromMatrix)
Copies values from another
Matrix to this matrix. |
void |
copy(Matrix fromMatrix,
int fromRow,
int fromColumn,
int toRow,
int toColumn,
int rows,
int columns)
Copies values from a defined offset from another matrix to a defined offset of this matrix.
|
static void |
copy(Matrix fromMatrix,
int fromRow,
int fromColumn,
MutableMatrix toMatrix,
int toRow,
int toColumn,
int rows,
int columns) |
void |
fill(float value)
Fills all writable elements of this matrix with the given value.
|
protected void |
set(int index,
float value) |
void |
set(int row,
int column,
float value)
Sets the given value.
|
void |
setColumn(int column,
float[] values)
Sets the given values.
|
void |
setRow(int row,
float[] values)
Sets the given values.
|
add, checkBounds, columnSum, enlarge, equals, get, get, getColumn, getNumberOfColumns, getNumberOfRows, getRow, hadamardMultiply, hashCode, isInvalid, isValidXORZeroPadded, isZeroPadded, multiply, multiply, rowSum, subtract, sum, toIndex, toString, translate, transpose
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, columnSum, enlarge, get, getColumn, getNumberOfColumns, getNumberOfRows, getRow, hadamardMultiply, isZeroPadded, multiply, multiply, rowSum, subtract, sum, translate, transpose
protected abstract void allocate(MatrixBackingBuffer buffer)
MatrixBackingBuffer.allocate(int)
on the used buffer.buffer
- bufferpublic void fill(float value)
MutableMatrix
fill
in interface MutableMatrix
value
- valuepublic void copy(float[] values)
MutableMatrix
copy
in interface MutableMatrix
values
- valuespublic void copy(Matrix fromMatrix)
MutableMatrix
Matrix
to this matrix.
If this matrix does not support the setting of certain elements (e.g. SymmetricBandMatrix
),
the method fails silently, i.e. no values are copied, and no exception is raised.copy
in interface MutableMatrix
fromMatrix
- other matrixpublic void copy(Matrix fromMatrix, int fromRow, int fromColumn, int toRow, int toColumn, int rows, int columns)
MutableMatrix
SymmetricBandMatrix
),
the method fails silently, i.e. no values are copied, and no exception is raised.copy
in interface MutableMatrix
fromMatrix
- other matrixfromRow
- row start offset of from matrixfromColumn
- column start offset of from matrixtoRow
- column start offset of this matrixtoColumn
- column start offset of this matrixrows
- number of rows to copycolumns
- number of column to copypublic static void copy(Matrix fromMatrix, int fromRow, int fromColumn, MutableMatrix toMatrix, int toRow, int toColumn, int rows, int columns)
public void set(int row, int column, float value)
MutableMatrix
set
in interface MutableMatrix
row
- rowcolumn
- columnvalue
- valuepublic void setColumn(int column, float[] values)
MutableMatrix
setColumn
in interface MutableMatrix
column
- columnvalues
- valuespublic void setRow(int row, float[] values)
MutableMatrix
setRow
in interface MutableMatrix
row
- rowvalues
- valuesprotected void set(int index, float value)
Copyright © 2011–2020 tagtraum industries incorporated. All rights reserved.