T - the type of the field elementspublic class SparseFieldMatrix<T extends FieldElement<T>> extends AbstractFieldMatrix<T>
| Constructor and Description |
|---|
SparseFieldMatrix(Field<T> field)
Creates a matrix with no data.
|
SparseFieldMatrix(Field<T> field,
int rowDimension,
int columnDimension)
Create a new SparseFieldMatrix
|
SparseFieldMatrix(FieldMatrix<T> other)
Generic copy constructor.
|
SparseFieldMatrix(SparseFieldMatrix<T> other)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToEntry(int row,
int column,
T increment)
Change an entry in the specified row and column.
|
FieldMatrix<T> |
copy()
Returns a (deep) copy of this.
|
FieldMatrix<T> |
createMatrix(int rowDimension,
int columnDimension)
Create a new FieldMatrix
|
int |
getColumnDimension()
Returns the number of columns in the matrix.
|
T |
getEntry(int row,
int column)
Returns the entry in the specified row and column.
|
int |
getRowDimension()
Returns the number of rows in the matrix.
|
void |
multiplyEntry(int row,
int column,
T factor)
Change an entry in the specified row and column.
|
void |
setEntry(int row,
int column,
T value)
Set the entry in the specified row and column.
|
add, copySubMatrix, copySubMatrix, equals, getColumn, getColumnMatrix, getColumnVector, getData, getField, getRow, getRowMatrix, getRowVector, getSubMatrix, getSubMatrix, getTrace, hashCode, isSquare, multiply, operate, operate, preMultiply, preMultiply, preMultiply, scalarAdd, scalarMultiply, setColumn, setColumnMatrix, setColumnVector, setRow, setRowMatrix, setRowVector, setSubMatrix, subtract, toString, transpose, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInColumnOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInOptimizedOrder, walkInRowOrder, walkInRowOrder, walkInRowOrder, walkInRowOrderpublic SparseFieldMatrix(Field<T> field)
field - field to which the elements belongpublic SparseFieldMatrix(Field<T> field, int rowDimension, int columnDimension) throws java.lang.IllegalArgumentException
field - field to which the elements belongrowDimension - the number of rows in the new matrixcolumnDimension - the number of columns in the new matrixjava.lang.IllegalArgumentException - if row or column dimension is not positivepublic SparseFieldMatrix(SparseFieldMatrix<T> other)
other - The instance to copypublic SparseFieldMatrix(FieldMatrix<T> other)
other - The instance to copypublic void addToEntry(int row,
int column,
T increment)
throws MatrixIndexException
Row and column indices start at 0 and must satisfy
0 <= row < rowDimension 0 <= column < columnDimensionMatrixIndexException is thrown.addToEntry in interface FieldMatrix<T extends FieldElement<T>>addToEntry in class AbstractFieldMatrix<T extends FieldElement<T>>row - row location of entry to be setcolumn - column location of entry to be setincrement - value to add to the current matrix entry in row,columnMatrixIndexException - if the row or column index is not validpublic FieldMatrix<T> copy()
copy in interface FieldMatrix<T extends FieldElement<T>>copy in class AbstractFieldMatrix<T extends FieldElement<T>>public FieldMatrix<T> createMatrix(int rowDimension, int columnDimension) throws java.lang.IllegalArgumentException
createMatrix in interface FieldMatrix<T extends FieldElement<T>>createMatrix in class AbstractFieldMatrix<T extends FieldElement<T>>rowDimension - the number of rows in the new matrixcolumnDimension - the number of columns in the new matrixjava.lang.IllegalArgumentException - if row or column dimension is not positivepublic int getColumnDimension()
getColumnDimension in interface AnyMatrixgetColumnDimension in class AbstractFieldMatrix<T extends FieldElement<T>>public T getEntry(int row, int column) throws MatrixIndexException
Row and column indices start at 0 and must satisfy
0 <= row < rowDimension 0 <= column < columnDimensionMatrixIndexException is thrown.getEntry in interface FieldMatrix<T extends FieldElement<T>>getEntry in class AbstractFieldMatrix<T extends FieldElement<T>>row - row location of entry to be fetchedcolumn - column location of entry to be fetchedMatrixIndexException - if the row or column index is not validpublic int getRowDimension()
getRowDimension in interface AnyMatrixgetRowDimension in class AbstractFieldMatrix<T extends FieldElement<T>>public void multiplyEntry(int row,
int column,
T factor)
throws MatrixIndexException
Row and column indices start at 0 and must satisfy
0 <= row < rowDimension 0 <= column < columnDimensionMatrixIndexException is thrown.multiplyEntry in interface FieldMatrix<T extends FieldElement<T>>multiplyEntry in class AbstractFieldMatrix<T extends FieldElement<T>>row - row location of entry to be setcolumn - column location of entry to be setfactor - multiplication factor for the current matrix entry in row,columnMatrixIndexException - if the row or column index is not validpublic void setEntry(int row,
int column,
T value)
throws MatrixIndexException
Row and column indices start at 0 and must satisfy
0 <= row < rowDimension 0 <= column < columnDimensionMatrixIndexException is thrown.setEntry in interface FieldMatrix<T extends FieldElement<T>>setEntry in class AbstractFieldMatrix<T extends FieldElement<T>>row - row location of entry to be setcolumn - column location of entry to be setvalue - matrix entry to be set in row,columnMatrixIndexException - if the row or column index is not validCopyright © 2010 - 2023 Adobe. All Rights Reserved