Companion

object Companion : MutableSparseMatrixCompanion<Boolean>

The companion object contains factory functions to create new instances with initialization.

Functions

Link copied to clipboard

Factory unction to create an instance based upon the matrix of SparseValues as initializers. This is not an invoke operator due to overloading issues.

Link copied to clipboard
open operator override fun <T : Boolean> invoke(original: SparseMatrix<T>): MutableSparseMatrix<T>

Create a new SparseMatrix that is a copy of the original.


operator fun invoke(maxWidth: Int, maxHeight: Int, validator: (Int, Int) -> Boolean): MutableSparseBooleanMatrix

Create a MutableBooleanMatrix initialized with the default value of the Boolean type (0)

open operator override fun <T : Boolean> invoke(maxWidth: Int, maxHeight: Int, init: SparseMatrix.SparseInit<T>.(Int, Int) -> SparseMatrix.SparseValue<T>): MutableSparseMatrix<T>
open operator override fun <T : Boolean> invoke(maxWidth: Int, maxHeight: Int, initValue: T, validator: (Int, Int) -> Boolean): MutableSparseMatrix<T>

Create a new SparseMatrix with the given size and intialization function. It also requires a validate function

Create a SparseBooleanMatrix initialized with the given value

operator fun invoke(maxWidth: Int, maxHeight: Int, initValue: Boolean, validator: (Int, Int) -> Boolean): MutableSparseBooleanMatrix
inline operator fun invoke(maxWidth: Int, maxHeight: Int, noinline validator: (Int, Int) -> Boolean, init: (Int, Int) -> Boolean): MutableSparseBooleanMatrix

Create a MutableSparseBooleanMatrix initialized with the given value

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

Create a new SparseMatrix subclass instance with the given size and intialization function. It also requires a validate function