Companion
Functions
Link copied to clipboard
open override fun <T : Int> fromSparseValueMatrix(source: Matrix<SparseMatrix.SparseValue<T>>): SparseMatrix<T>
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 : Int> 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 : Int> 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
Create a new matrix that is a copy of the original
open inline operator override fun <T : Int> 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<Int>.(Int, Int) -> SparseMatrix.SparseValue<Int>): SparseIntMatrix
inline operator fun invoke(maxWidth: Int, maxHeight: Int, noinline validator: (Int, Int) -> Boolean, init: (Int, Int) -> Int): SparseIntMatrix
operator fun invoke(maxWidth: Int, maxHeight: Int, initValue: Int, validator: (Int, Int) -> Boolean): SparseIntMatrix
Create a SparseIntMatrix initialized with the given value
open operator override fun <T : Int> invoke(maxWidth: Int, maxHeight: Int, initValue: T, validator: (Int, Int) -> Boolean): SparseMatrix<T>
open inline operator override fun <T : Int> 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