Packages

c

com.twitter.algebird

TopNCMSAggregator

case class TopNCMSAggregator[K](cmsMonoid: TopNCMSMonoid[K]) extends TopCMSAggregator[K] with Product with Serializable

An Aggregator for TopNCMS. Can be created using TopNCMS.aggregator.

Linear Supertypes
Product, Equals, TopCMSAggregator[K], MonoidAggregator[K, TopCMS[K], TopCMS[K]], Aggregator[K, TopCMS[K], TopCMS[K]], Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TopNCMSAggregator
  2. Product
  3. Equals
  4. TopCMSAggregator
  5. MonoidAggregator
  6. Aggregator
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new TopNCMSAggregator(cmsMonoid: TopNCMSMonoid[K])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThenPresent[D](present2: (TopCMS[K]) => D): MonoidAggregator[K, TopCMS[K], D]

    Like calling andThen on the present function

    Like calling andThen on the present function

    Definition Classes
    MonoidAggregatorAggregator
  5. def append(l: TopCMS[K], r: K): TopCMS[K]
    Definition Classes
    Aggregator
  6. def appendAll(items: TraversableOnce[K]): TopCMS[K]
    Definition Classes
    MonoidAggregator
  7. def appendAll(old: TopCMS[K], items: TraversableOnce[K]): TopCMS[K]
    Definition Classes
    Aggregator
  8. def apply(inputs: TraversableOnce[K]): TopCMS[K]

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

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

    Definition Classes
    Aggregator
  9. def applyCumulatively[In <: TraversableOnce[K], Out](inputs: In)(implicit bf: CanBuildFrom[In, TopCMS[K], 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
  10. def applyOption(inputs: TraversableOnce[K]): Option[TopCMS[K]]

    This returns None if the inputs are empty

    This returns None if the inputs are empty

    Definition Classes
    Aggregator
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  13. val cmsMonoid: TopNCMSMonoid[K]
  14. def collectBefore[A2](fn: PartialFunction[A2, K]): MonoidAggregator[A2, TopCMS[K], TopCMS[K]]

    Only transform values where the function is defined, else discard

    Only transform values where the function is defined, else discard

    Definition Classes
    MonoidAggregator
  15. def composePrepare[A2](prepare2: (A2) => K): MonoidAggregator[A2, TopCMS[K], TopCMS[K]]

    Like calling compose on the prepare function

    Like calling compose on the prepare function

    Definition Classes
    MonoidAggregatorAggregator
  16. def cumulativeIterator(inputs: Iterator[K]): Iterator[TopCMS[K]]

    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
  17. def either[A2, B2, C2](that: MonoidAggregator[A2, B2, C2]): MonoidAggregator[Either[K, A2], (TopCMS[K], B2), (TopCMS[K], 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
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def filterBefore[A1 <: K](pred: (A1) => Boolean): MonoidAggregator[A1, TopCMS[K], TopCMS[K]]

    Only aggregate items that match a predicate

    Only aggregate items that match a predicate

    Definition Classes
    MonoidAggregator
  20. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  21. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def join[A2 <: K, B2, C2](that: Aggregator[A2, B2, C2]): Aggregator[A2, (TopCMS[K], B2), (TopCMS[K], 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
  24. def lift: MonoidAggregator[K, Option[TopCMS[K]], Option[TopCMS[K]]]
    Definition Classes
    Aggregator
  25. def monoid: TopCMSMonoid[K]
    Definition Classes
    TopCMSAggregatorMonoidAggregator
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. def prepare(value: K): TopCMS[K]
    Definition Classes
    TopCMSAggregatorAggregator
  30. def present(cms: TopCMS[K]): TopCMS[K]
    Definition Classes
    TopCMSAggregatorAggregator
  31. def productElementNames: Iterator[String]
    Definition Classes
    Product
  32. final def reduce(items: TraversableOnce[TopCMS[K]]): TopCMS[K]

    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
  33. def reduce(l: TopCMS[K], r: TopCMS[K]): TopCMS[K]

    combine two inner values

    combine two inner values

    Definition Classes
    Aggregator
  34. def reduceOption(items: TraversableOnce[TopCMS[K]]): Option[TopCMS[K]]

    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
  35. def semigroup: Monoid[TopCMS[K]]
    Definition Classes
    MonoidAggregatorAggregator
  36. def sumBefore: MonoidAggregator[TraversableOnce[K], TopCMS[K], TopCMS[K]]

    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
  37. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  38. def toFold: Fold[K, Option[TopCMS[K]]]

    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
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  42. def zip[A2, B2, C2](ag2: MonoidAggregator[A2, B2, C2]): MonoidAggregator[(K, A2), (TopCMS[K], B2), (TopCMS[K], C2)]

    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.

    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
  43. def zip[A2, B2, C2](ag2: Aggregator[A2, B2, C2]): Aggregator[(K, A2), (TopCMS[K], B2), (TopCMS[K], C2)]

    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.

    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 Product

Inherited from Equals

Inherited from TopCMSAggregator[K]

Inherited from MonoidAggregator[K, TopCMS[K], TopCMS[K]]

Inherited from Aggregator[K, TopCMS[K], TopCMS[K]]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped