invoke
Create a new mutable matrix initialized from the source.
Factory function that creates and initializes a (readonly) MutableSparseIntMatrix. maxWidth and maxHeight are used for the underlying array dimensions. This variant uses a sealed return type to determine whether a value is sparse or not.
Parameters
The maximum width allowed in the matrix
The maximum height allowed in the matrix
Function that determines the initial value for a location.
Create a SparseIntMatrix initialized with the given value
Parameters
Width of the matrix
Height of the matrix
The function initializing the matrix
Create a new SparseMatrix with the given size and intialization function. It also requires a validate function
Parameters
The width of the matrix
The height of the matrix
An value for the non-sparse elements of the matrix
A function that is used to determine whether a particular coordinate is contained in the matrix.
Create a MutableIntMatrix initialized with the default value of the Int type (0
)
Parameters
Width of the matrix
Height of the matrix
Function that determines which cells are part of the matrix
Create a MutableSparseIntMatrix initialized with the given value
Parameters
Width of the matrix
Height of the matrix
The initial value for the elements
The function that determines whether a given cell is valid.
Create a new SparseMatrix subclass instance with the given size and intialization function. It also requires a validate function
Parameters
The width of the matrix
The height of the matrix
A function that is used to determine whether a particular coordinate is contained in the matrix.
An initialization function that sets the values for the matrix.
Create a MutableSparseIntMatrix initialized with the given value
Parameters
Width of the matrix
Height of the matrix
The function initializing the matrix
The function that determines whether a given cell is valid.