Companion
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
Create a sparse matrix from the given matrix with special SparseValue
instances that indicate either a value or sparseness.
Create a new lazy SparseMatrix with the given size and intialization function. It also requires a validate function
Create a new lazy SparseMatrix with the given size and value function. It also requires a validate function
Create a copy of the parameter using the copyOf
member function.
Create a sparse matrix with given maximum X and Y that is initialized using the given "constructor" function. This function invokes the initializer on construction only.
Create a sparse matrix that has the given maximum X and Y values, is initialized with the parameter value, and uses the function to determine whether the cell exists. The returned matrix is immutable, but the validator is not required to always return the same value.
Create a sparse matrix that has the given maximum X and Y values, has the given validator to determine sparseness and uses the given function to initialize the matrix (values set on construction).