Companion

object Companion : ImmutableSparseMatrixCompanion<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 fun <T : Boolean> function(maxWidth: Int, maxHeight: Int, valueFun: SparseMatrix.SparseInit<T>.(Int, Int) -> SparseMatrix.SparseValue<T>): SparseMatrix<T>

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

open fun <T : Boolean> function(maxWidth: Int, maxHeight: Int, validator: (Int, Int) -> Boolean, valueFun: (Int, Int) -> T): SparseMatrix<T>

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

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

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

Create a new matrix that is a copy of the original

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

Create a new SparseMatrix with the given size and intialization function. The initialization function

inline operator fun invoke(maxWidth: Int, maxHeight: Int, init: SparseMatrix.SparseInit<Boolean>.(Int, Int) -> SparseMatrix.SparseValue<Boolean>): SparseBooleanMatrix
operator fun invoke(maxWidth: Int, maxHeight: Int, initValue: Boolean, validator: (Int, Int) -> Boolean): SparseBooleanMatrix
inline operator fun invoke(maxWidth: Int, maxHeight: Int, noinline validator: (Int, Int) -> Boolean, init: (Int, Int) -> Boolean): SparseBooleanMatrix

Create a SparseBooleanMatrix initialized with the given value

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

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