invoke

inline operator fun <T> invoke(maxWidth: Int, maxHeight: Int, noinline validator: (Int, Int) -> Boolean, init: (Int, Int) -> T): ArrayMutableSparseMatrix<T>

Create a new ArrayMutableSparseMatrix instance with the given parameters.

Return

The newly created matrix

Parameters

maxWidth

The maximum width of the matrix (maximum x coordinate+1)

maxHeight

The maximum height of the matrix (maximum y coordinate+1)

validator

The function that determines whether a given cell is valid

init

Inline function used to initialize the data