Package

odkl.analysis.spark.util

collection

Permalink

package collection

Visibility
  1. Public
  2. All

Type Members

  1. class BitSet extends Serializable

    Permalink

    A simple, fixed-size bit set implementation.

    A simple, fixed-size bit set implementation. This implementation is fast because it avoids safety/bound checking.

    Annotations
    @SerialVersionUID()
  2. trait CollectionOperations extends AnyRef

    Permalink

    Created by vyacheslav.baranov on 19/06/15.

  3. class CompactBuffer[T] extends Seq[T] with Serializable

    Permalink

    An append-only buffer similar to ArrayBuffer, but more memory-efficient for small buffers.

    An append-only buffer similar to ArrayBuffer, but more memory-efficient for small buffers. ArrayBuffer always allocates an Object array to store the data, with 16 entries by default, so it has about 80-100 bytes of overhead. In contrast, CompactBuffer can keep up to two elements in fields of the main object, and only allocates an Array[AnyRef] if there are more entries than that. This makes it more efficient for operations like groupBy where we expect some keys to have very few elements.

    Annotations
    @SerialVersionUID()
  4. class OpenHashMap[K, V] extends Iterable[(K, V)] with Serializable

    Permalink

    :: DeveloperApi :: A fast hash map implementation for nullable keys.

    :: DeveloperApi :: A fast hash map implementation for nullable keys. This hash map supports insertions and updates, but not deletions. This map is about 5X faster than java.util.HashMap, while using much less space overhead.

    Under the hood, it uses our OpenHashSet implementation.

    Annotations
    @SerialVersionUID()
  5. class OpenHashSet[T] extends Serializable

    Permalink

    A simple, fast hash set optimized for non-null insertion-only use case, where keys are never removed.

    A simple, fast hash set optimized for non-null insertion-only use case, where keys are never removed.

    The underlying implementation uses Scala compiler's specialization to generate optimized storage for two primitive types (Long and Int). It is much faster than Java's standard HashSet while incurring much less memory overhead. This can serve as building blocks for higher level data structures such as an optimized HashMap.

    This OpenHashSet is designed to serve as building blocks for higher level data structures such as an optimized hash map. Compared with standard hash set implementations, this class provides its various callbacks interfaces (e.g. allocateFunc, moveFunc) and interfaces to retrieve the position of a key in the underlying array.

    It uses quadratic probing with a power-of-2 hash table size, which is guaranteed to explore all spaces for each key (see http://en.wikipedia.org/wiki/Quadratic_probing).

    Annotations
    @SerialVersionUID()

Value Members

  1. object CollectionOperations extends CollectionOperations

    Permalink

Ungrouped