Package org.ejml.data
Interface FMatrixSparse
- All Superinterfaces:
FMatrix
,Matrix
,MatrixSparse
,ReshapeMatrix
,Serializable
- All Known Implementing Classes:
FMatrixSparseCSC
,FMatrixSparseTriplet
@Generated("org.ejml.data.DMatrixSparse")
public interface FMatrixSparse
extends FMatrix, MatrixSparse
High level interface for sparse matrices float types.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Value of an element in a sparse matrix -
Method Summary
Modifier and TypeMethodDescriptionCreates an iterator which will go through each non-zero value in the sparse matrix.float
get
(int row, int col, float fallBackValue) Returns the value of value of the specified matrix element.float
unsafe_get
(int row, int col, float fallBackValue) Same asget(int, int, float)
but does not perform bounds check on input parameters.Methods inherited from interface org.ejml.data.FMatrix
get, getNumElements, set, unsafe_get, unsafe_set
Methods inherited from interface org.ejml.data.Matrix
copy, create, createLike, getNumCols, getNumRows, getType, print, print, setTo
Methods inherited from interface org.ejml.data.MatrixSparse
getNonZeroLength, isAssigned, printNonZero, remove, reshape, reshape, shrinkArrays, zero
-
Method Details
-
get
float get(int row, int col, float fallBackValue) Returns the value of value of the specified matrix element.- Parameters:
row
- Matrix element's row index..col
- Matrix element's column index.fallBackValue
- Value to return, if the matrix element is not assigned- Returns:
- The specified element's value.
-
unsafe_get
float unsafe_get(int row, int col, float fallBackValue) Same asget(int, int, float)
but does not perform bounds check on input parameters. This results in about a 25% speed increase but potentially sacrifices stability and makes it more difficult to track down simple errors. It is not recommended that this function be used, except in highly optimized code where the bounds are implicitly being checked.- Parameters:
row
- Matrix element's row index..col
- Matrix element's column index.fallBackValue
- Value to return, if the matrix element is not assigned- Returns:
- The specified element's value or the fallBackValue, if the element is not assigned.
-
createCoordinateIterator
Iterator<FMatrixSparse.CoordinateRealValue> createCoordinateIterator()Creates an iterator which will go through each non-zero value in the sparse matrix. Order is not defined and is implementation specific
-