SparseArray

Companion:
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[@specialized(Int, Float, Double) T : Zero](values: T*): SparseArray[T]
def create[@specialized(Int, Float, Double) T : Zero](length: Int)(values: (Int, T)*): SparseArray[T]
def fill[@specialized(Int, Float, Double) T : Zero](length: Int)(value: => T): SparseArray[T]

Creates a SparseArray filled with the given value. The value function is called once initially to test if the returned value is equal to the DefaultArrayValue - if so, an empty SparseArray with initialActiveLength non-zero entries is returned. Otherwise, an inefficient "dense" SparseArray is returned.

Creates a SparseArray filled with the given value. The value function is called once initially to test if the returned value is equal to the DefaultArrayValue - if so, an empty SparseArray with initialActiveLength non-zero entries is returned. Otherwise, an inefficient "dense" SparseArray is returned.

def tabulate[@specialized(Int, Float, Double) T : Zero](length: Int)(fn: Int => T): SparseArray[T]