Compact Array Mutable Sparse Matrix
Create a new instance of the class with the given validation function. All elements of the matrix will be set to the same initial value. The validation function does not need to validate that the coordinate is within
Parameters
max Width
The width of the matrix in columns
max Height
The height of the matrix in rows
init Value
The initial value for all cells
validator
The function used to determine whether a cell is used in the matrix.
Create a new instance that is a copy of the original matrix. This will be a shallow copy as in the elements will not be copied.
A constructor that creates a new CompactArrayMutableSparseMatrix given a matrix of SparseValues. Those are used to initialize the matrix.
Parameters
source
The matrix to get values from.