Storage

Interface for an unboxed iterable, of sorts, for things backed by a flat array of elements.

class Object
trait Matchable
class Any
class SparseArray[V]
trait StorageVector[V]
class DenseVector[V]
class SparseVector[V]

Value members

Abstract methods

How many elements are stored in terms of space. In HashVectors, activeSize is the number of non-zero elements, while iterableSize is the number of buckets currently allocated. (activeSize <= iterableSize in general, activeSize == iterableSize for everything except hashing implementations.)

How many elements are stored in terms of space. In HashVectors, activeSize is the number of non-zero elements, while iterableSize is the number of buckets currently allocated. (activeSize <= iterableSize in general, activeSize == iterableSize for everything except hashing implementations.)

Only gives true if isActive would return true for all i. (May be false anyway)

Only gives true if isActive would return true for all i. (May be false anyway)

def data: Array[V]

Returns the actual flat array of elements used.

Returns the actual flat array of elements used.

def indexAt(i: Int): Int

Gives the logical index from the physical index.

Gives the logical index from the physical index.

Some storages (namely HashStorage) won't have active indices packed. This lets you know if the bin is actively in use.

Some storages (namely HashStorage) won't have active indices packed. This lets you know if the bin is actively in use.

Value parameters:
i

index into index/data arrays

protected def size: Int

How many elements are logically stored here. This may be <= activeSize.

How many elements are logically stored here. This may be <= activeSize.

def valueAt(i: Int): V

same as data(i). Gives the value at the underlying offset.

same as data(i). Gives the value at the underlying offset.

Value parameters:
i

index into the data array

Concrete methods

How many elements must be iterated over using valueAt/indexAt. In HashVectors, activeSize is the number of non-zero elements, while iterableSize is the number of buckets currently allocated. (activeSize <= iterableSize in general, activeSize == iterableSize for everything except hashing implementations.)

How many elements must be iterated over using valueAt/indexAt. In HashVectors, activeSize is the number of non-zero elements, while iterableSize is the number of buckets currently allocated. (activeSize <= iterableSize in general, activeSize == iterableSize for everything except hashing implementations.)