FunSparseMatrix

constructor(maxWidth: Int, maxHeight: Int, validator: (Int, Int) -> Boolean, valueFun: (Int, Int) -> T)

Constructor where validity and value are determined by validator and valueFun separately. This is somewhat more efficient in the case that valueFun is expensive as validator is called separately.


constructor(maxWidth: Int, maxHeight: Int, valueFun: SparseMatrix.SparseInit<T>.(Int, Int) -> SparseMatrix.SparseValue<T>)

Constructor where validity and value are determined by the same underlying function. Note that valueFun is always called, results are not cached.