Sparse Matrix
A 2-dimensional storage type/matrix that does not require values in all cells. This is a read-only type. The writable version is MutableSparseMatrix. The minimum coordinate is always
Inheritors
Types
The companion object contains factory functions to create new instances. There is no guarantee as to the specific type returned for the interface (but always an instance of SparseMatrix).
Functions
Get all elements in the matrix as sequence.
Determine whether the content of this matrix is the same as the other by checking equality on the cell values. Sparse matrices with different dimensions, but the same valid indices can be equal.
Creates a copy of the matrix of an appropriate type with the same content.
Perform the action for each index in the (sparse) matrix. This skips sparse indices.
This function can be used to determine whether the given coordinates are valid. Returns true if valid. This function works on any value for the coordinates and should return false
for all values out of range (x<0 || x>=[maxWidth]
), (y<0 || y>=[maxHeight]
).
A map implementation that creates a boolean sparse matrix based upon the receiver and the transformation function.
Create a new SparseIntMatrix with the dimensions of the original where the value of each cell is the result of applying the transform to the value of the cell in the original.