Class/Object

com.twitter.algebird

QTreeAggregator

Related Docs: object QTreeAggregator | package algebird

Permalink

case class QTreeAggregator[T](percentile: Double, k: Int = QTreeAggregator.DefaultK)(implicit num: Numeric[T]) extends Aggregator[T, QTree[Unit], Intersection[InclusiveLower, InclusiveUpper, Double]] with QTreeAggregatorLike[T] with Product with Serializable

QTree aggregator is an aggregator that can be used to find the approximate percentile bounds. The items that are iterated over to produce this approximation cannot be negative. Returns an Intersection which represents the bounded approximation.

Source
QTree.scala
Linear Supertypes
Serializable, Product, Equals, QTreeAggregatorLike[T], Aggregator[T, QTree[Unit], Intersection[InclusiveLower, InclusiveUpper, Double]], Serializable, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. QTreeAggregator
  2. Serializable
  3. Product
  4. Equals
  5. QTreeAggregatorLike
  6. Aggregator
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new QTreeAggregator(percentile: Double, k: Int = QTreeAggregator.DefaultK)(implicit num: Numeric[T])

    Permalink

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 andThenPresent[D](present2: (Intersection[InclusiveLower, InclusiveUpper, Double]) ⇒ D): Aggregator[T, QTree[Unit], D]

    Permalink

    Like calling andThen on the present function

    Like calling andThen on the present function

    Definition Classes
    Aggregator
  5. def append(l: QTree[Unit], r: T): QTree[Unit]

    Permalink
    Definition Classes
    Aggregator
  6. def appendAll(old: QTree[Unit], items: TraversableOnce[T]): QTree[Unit]

    Permalink
    Definition Classes
    Aggregator
  7. def apply(inputs: TraversableOnce[T]): Intersection[InclusiveLower, InclusiveUpper, Double]

    Permalink

    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
  8. def applyCumulatively[In <: TraversableOnce[T], Out](inputs: In)(implicit bf: CanBuildFrom[In, Intersection[InclusiveLower, InclusiveUpper, Double], Out]): Out

    Permalink

    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
  9. def applyOption(inputs: TraversableOnce[T]): Option[Intersection[InclusiveLower, InclusiveUpper, Double]]

    Permalink

    This returns None if the inputs are empty

    This returns None if the inputs are empty

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def composePrepare[A1](prepare2: (A1) ⇒ T): Aggregator[A1, QTree[Unit], Intersection[InclusiveLower, InclusiveUpper, Double]]

    Permalink

    Like calling compose on the prepare function

    Like calling compose on the prepare function

    Definition Classes
    Aggregator
  13. def cumulativeIterator(inputs: Iterator[T]): Iterator[Intersection[InclusiveLower, InclusiveUpper, Double]]

    Permalink

    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
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    Any
  18. def join[A2 <: T, B2, C2](that: Aggregator[A2, B2, C2]): Aggregator[A2, (QTree[Unit], B2), (Intersection[InclusiveLower, InclusiveUpper, Double], C2)]

    Permalink

    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
  19. val k: Int

    Permalink

    This is the depth parameter for the QTreeSemigroup

    This is the depth parameter for the QTreeSemigroup

    Definition Classes
    QTreeAggregatorQTreeAggregatorLike
  20. def level: Int

    Permalink

    We convert T to a Double, then the Double is converted to a Long by using a 2^level bucket size.

    We convert T to a Double, then the Double is converted to a Long by using a 2^level bucket size.

    Definition Classes
    QTreeAggregatorLike
  21. def lift: MonoidAggregator[T, Option[QTree[Unit]], Option[Intersection[InclusiveLower, InclusiveUpper, Double]]]

    Permalink
    Definition Classes
    Aggregator
  22. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  25. implicit val num: Numeric[T]

    Permalink
    Definition Classes
    QTreeAggregatorQTreeAggregatorLike
  26. val percentile: Double

    Permalink
    Definition Classes
    QTreeAggregatorQTreeAggregatorLike
  27. def prepare(input: T): QTree[Unit]

    Permalink
    Definition Classes
    QTreeAggregatorLike
  28. def present(qt: QTree[Unit]): Intersection[InclusiveLower, InclusiveUpper, Double]

    Permalink
    Definition Classes
    QTreeAggregatorAggregator
  29. def reduce(items: TraversableOnce[QTree[Unit]]): QTree[Unit]

    Permalink

    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
    Aggregator
  30. def reduce(l: QTree[Unit], r: QTree[Unit]): QTree[Unit]

    Permalink

    combine two inner values

    combine two inner values

    Definition Classes
    Aggregator
  31. def reduceOption(items: TraversableOnce[QTree[Unit]]): Option[QTree[Unit]]

    Permalink

    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
  32. def semigroup: QTreeSemigroup[Unit]

    Permalink
    Definition Classes
    QTreeAggregatorLike
  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toFold: Fold[T, Option[Intersection[InclusiveLower, InclusiveUpper, Double]]]

    Permalink

    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
  35. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. def zip[A2, B2, C2](ag2: Aggregator[A2, B2, C2]): Aggregator[(T, A2), (QTree[Unit], B2), (Intersection[InclusiveLower, InclusiveUpper, Double], C2)]

    Permalink

    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 Serializable

Inherited from Product

Inherited from Equals

Inherited from QTreeAggregatorLike[T]

Inherited from Aggregator[T, QTree[Unit], Intersection[InclusiveLower, InclusiveUpper, Double]]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped