Object/Class

com.twitter.algebird

Batched

Related Docs: class Batched | package algebird

Permalink

object Batched extends Serializable

Source
Batched.scala
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Batched
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def aggregator[A, B, C](batchSize: Int, agg: Aggregator[A, B, C]): Aggregator[A, Batched[B], C]

    Permalink

    This aggregator batches up agg so that all the addition can be performed at once.

    This aggregator batches up agg so that all the addition can be performed at once.

    It is useful when sumOption is much faster than using plus (e.g. when there is temporary mutable state used to make summation fast).

  5. def apply[T](t: T): Batched[T]

    Permalink

    Constructed a batch from a single value.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def compactingMonoid[A](batchSize: Int)(implicit arg0: Monoid[A]): Monoid[Batched[A]]

    Permalink

    Compacting monoid for batched values.

    Compacting monoid for batched values.

    This monoid ensures that the batch's tree structure has fewer than batchSize values in it. When more values are added, the tree is compacted using m.

    It's worth noting that x + 0 here will produce the same sum as x, but .toList will produce different lists (one will have an extra zero).

  9. def compactingSemigroup[A](batchSize: Int)(implicit arg0: Semigroup[A]): Semigroup[Batched[A]]

    Permalink

    Compacting semigroup for batched values.

    Compacting semigroup for batched values.

    This semigroup ensures that the batch's tree structure has fewer than batchSize values in it. When more values are added, the tree is compacted using s.

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. implicit def equiv[A](implicit e: Equiv[A], s: Semigroup[A]): Equiv[Batched[A]]

    Permalink

    Equivalence for batches.

    Equivalence for batches.

    Batches are equivalent if they sum to the same value. Since the free semigroup is associative, it's not correct to take tree structure into account when determining equality.

    One thing to note here is that two equivalent batches might produce different lists (for instance, if one of the batches has more zeros in it than another one).

  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def fold[T](batchSize: Int)(implicit m: Monoid[T]): Fold[T, T]

    Permalink
  15. def foldOption[T](batchSize: Int)(implicit arg0: Semigroup[T]): Fold[T, Option[T]]

    Permalink
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def items[T](ts: TraversableOnce[T]): Option[Batched[T]]

    Permalink

    Constructed an optional batch from a collection of values.

    Constructed an optional batch from a collection of values.

    Since batches cannot be empty, this method returns None if ts is empty, and Some(batch) otherwise.

  20. def monoidAggregator[A, B, C](batchSize: Int, agg: MonoidAggregator[A, B, C]): MonoidAggregator[A, Batched[B], C]

    Permalink

    This monoid aggregator batches up agg so that all the addition can be performed at once.

    This monoid aggregator batches up agg so that all the addition can be performed at once.

    It is useful when sumOption is much faster than using plus (e.g. when there is temporary mutable state used to make summation fast).

  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. implicit def semigroup[A]: Semigroup[Batched[A]]

    Permalink

    The free semigroup for batched values.

    The free semigroup for batched values.

    This semigroup just accumulates batches and doesn't ever evaluate them to flatten the tree.

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped