com.twitter.algebird

SketchMapAggregator

case class SketchMapAggregator[K, V](params: SketchMapParams[K], skmMonoid: SketchMapMonoid[K, V])(implicit valueOrdering: Ordering[V], valueMonoid: Monoid[V]) extends MonoidAggregator[(K, V), SketchMap[K, V], SketchMap[K, V]] with Product with Serializable

An Aggregator for the SketchMap. Can be created using SketchMap.aggregator

Linear Supertypes
Serializable, Product, Equals, MonoidAggregator[(K, V), SketchMap[K, V], SketchMap[K, V]], Aggregator[(K, V), SketchMap[K, V], SketchMap[K, V]], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SketchMapAggregator
  2. Serializable
  3. Product
  4. Equals
  5. MonoidAggregator
  6. Aggregator
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SketchMapAggregator(params: SketchMapParams[K], skmMonoid: SketchMapMonoid[K, V])(implicit valueOrdering: Ordering[V], valueMonoid: Monoid[V])

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def andThenPresent[D](present2: (SketchMap[K, V]) ⇒ D): MonoidAggregator[(K, V), SketchMap[K, V], D]

    Like calling andThen on the present function

    Like calling andThen on the present function

    Definition Classes
    MonoidAggregatorAggregator
  7. def append(l: SketchMap[K, V], r: (K, V)): SketchMap[K, V]

    Definition Classes
    Aggregator
  8. def appendAll(items: TraversableOnce[(K, V)]): SketchMap[K, V]

    Definition Classes
    MonoidAggregator
  9. def appendAll(old: SketchMap[K, V], items: TraversableOnce[(K, V)]): SketchMap[K, V]

    Definition Classes
    Aggregator
  10. def apply(inputs: TraversableOnce[(K, V)]): SketchMap[K, V]

    This may error if inputs are empty (for Monoid Aggregators it never will, instead you see present(Monoid.

    This may error if inputs are empty (for Monoid Aggregators it never will, instead you see present(Monoid.zero[B])

    Definition Classes
    Aggregator
  11. def applyCumulatively[In <: TraversableOnce[(K, V)], Out](inputs: In)(implicit bf: CanBuildFrom[In, SketchMap[K, V], Out]): Out

    This returns the cumulative sum of its inputs, in the same order.

    This returns the cumulative sum of its inputs, in the same order. If the inputs are empty, the result will be empty too.

    Definition Classes
    Aggregator
  12. def applyOption(inputs: TraversableOnce[(K, V)]): Option[SketchMap[K, V]]

    This returns None if the inputs are empty

    This returns None if the inputs are empty

    Definition Classes
    Aggregator
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def collectBefore[A2](fn: PartialFunction[A2, (K, V)]): MonoidAggregator[A2, SketchMap[K, V], SketchMap[K, V]]

    Only transform values where the function is defined, else discard

    Only transform values where the function is defined, else discard

    Definition Classes
    MonoidAggregator
  16. def composePrepare[A2](prepare2: (A2) ⇒ (K, V)): MonoidAggregator[A2, SketchMap[K, V], SketchMap[K, V]]

    Like calling compose on the prepare function

    Like calling compose on the prepare function

    Definition Classes
    MonoidAggregatorAggregator
  17. def cumulativeIterator(inputs: Iterator[(K, V)]): Iterator[SketchMap[K, V]]

    This returns the cumulative sum of its inputs, in the same order.

    This returns the cumulative sum of its inputs, in the same order. If the inputs are empty, the result will be empty too.

    Definition Classes
    Aggregator
  18. def either[A2, B2, C2](that: MonoidAggregator[A2, B2, C2]): MonoidAggregator[Either[(K, V), A2], (SketchMap[K, V], B2), (SketchMap[K, V], C2)]

    Build a MonoidAggregator that either takes left or right input and outputs the pair from both

    Build a MonoidAggregator that either takes left or right input and outputs the pair from both

    Definition Classes
    MonoidAggregator
  19. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. def filterBefore[A1 <: (K, V)](pred: (A1) ⇒ Boolean): MonoidAggregator[A1, SketchMap[K, V], SketchMap[K, V]]

    Only aggregate items that match a predicate

    Only aggregate items that match a predicate

    Definition Classes
    MonoidAggregator
  21. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]

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

    Definition Classes
    Any
  24. def join[A2 <: (K, V), B2, C2](that: Aggregator[A2, B2, C2]): Aggregator[A2, (SketchMap[K, V], B2), (SketchMap[K, V], C2)]

    This allows you to run two aggregators on the same data with a single pass

    This allows you to run two aggregators on the same data with a single pass

    Definition Classes
    Aggregator
  25. def lift: MonoidAggregator[(K, V), Option[SketchMap[K, V]], Option[SketchMap[K, V]]]

    Definition Classes
    Aggregator
  26. val monoid: SketchMapMonoid[K, V]

    Definition Classes
    SketchMapAggregatorMonoidAggregator
  27. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. final def notify(): Unit

    Definition Classes
    AnyRef
  29. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  30. val params: SketchMapParams[K]

  31. def prepare(value: (K, V)): SketchMap[K, V]

    Definition Classes
    SketchMapAggregatorAggregator
  32. def present(skm: SketchMap[K, V]): SketchMap[K, V]

    Definition Classes
    SketchMapAggregatorAggregator
  33. final def reduce(items: TraversableOnce[SketchMap[K, V]]): SketchMap[K, V]

    This may error if items is empty.

    This may error if items is empty. To be safe you might use reduceOption if you don't know that items is non-empty

    Definition Classes
    MonoidAggregatorAggregator
  34. def reduce(l: SketchMap[K, V], r: SketchMap[K, V]): SketchMap[K, V]

    combine two inner values

    combine two inner values

    Definition Classes
    Aggregator
  35. def reduceOption(items: TraversableOnce[SketchMap[K, V]]): Option[SketchMap[K, V]]

    This is the safe version of the above.

    This is the safe version of the above. If the input in empty, return None, else reduce the items

    Definition Classes
    Aggregator
  36. def semigroup: Monoid[SketchMap[K, V]]

    Definition Classes
    MonoidAggregatorAggregator
  37. val skmMonoid: SketchMapMonoid[K, V]

  38. def sumBefore: MonoidAggregator[TraversableOnce[(K, V)], SketchMap[K, V], SketchMap[K, V]]

    This maps the inputs to Bs, then sums them, effectively flattening the inputs to the MonoidAggregator

    This maps the inputs to Bs, then sums them, effectively flattening the inputs to the MonoidAggregator

    Definition Classes
    MonoidAggregator
  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  40. def toFold: Fold[(K, V), Option[SketchMap[K, V]]]

    An Aggregator can be converted to a Fold, but not vice-versa Note, a Fold is more constrained so only do this if you require joining a Fold with an Aggregator to produce a Fold

    An Aggregator can be converted to a Fold, but not vice-versa Note, a Fold is more constrained so only do this if you require joining a Fold with an Aggregator to produce a Fold

    Definition Classes
    Aggregator
  41. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. def zip[A2, B2, C2](ag2: MonoidAggregator[A2, B2, C2]): MonoidAggregator[((K, V), A2), (SketchMap[K, V], B2), (SketchMap[K, V], C2)]

    This allows you to join two aggregators into one that takes a tuple input, which in turn allows you to chain .

    This allows you to join two aggregators into one that takes a tuple input, which in turn allows you to chain .composePrepare onto the result if you have an initial input that has to be prepared differently for each of the joined aggregators.

    The law here is: ag1.zip(ag2).apply(as.zip(bs)) == (ag1(as), ag2(bs))

    Definition Classes
    MonoidAggregator
  45. def zip[A2, B2, C2](ag2: Aggregator[A2, B2, C2]): Aggregator[((K, V), A2), (SketchMap[K, V], B2), (SketchMap[K, V], C2)]

    This allows you to join two aggregators into one that takes a tuple input, which in turn allows you to chain .

    This allows you to join two aggregators into one that takes a tuple input, which in turn allows you to chain .composePrepare onto the result if you have an initial input that has to be prepared differently for each of the joined aggregators.

    The law here is: ag1.zip(ag2).apply(as.zip(bs)) == (ag1(as), ag2(bs))

    Definition Classes
    Aggregator

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from MonoidAggregator[(K, V), SketchMap[K, V], SketchMap[K, V]]

Inherited from Aggregator[(K, V), SketchMap[K, V], SketchMap[K, V]]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped