Class/Object

com.twitter.algebird

QTree

Related Docs: object QTree | package algebird

Permalink

case class QTree[A](offset: Long, level: Int, count: Long, sum: A, lowerChild: Option[QTree[A]], upperChild: Option[QTree[A]]) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. QTree
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new QTree(offset: Long, level: Int, count: Long, sum: A, lowerChild: Option[QTree[A]], upperChild: Option[QTree[A]])

    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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def compress(k: Int)(implicit m: Monoid[A]): QTree[A]

    Permalink

    Users should never need to call this if they are adding QTrees using the Semigroup This makes sure no element in the tree has count less than the total count / 2k. That means after this call there are at most 2k nodes, but usually fewer.

  7. val count: Long

    Permalink
  8. def dump: Unit

    Permalink

    A debug method that prints the QTree to standard out using print/println

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def interQuartileMean(implicit n: Numeric[A], m: Monoid[A]): (Double, Double)

    Permalink

    This gives you the mean for the middle 50%-ile.

    This gives you the mean for the middle 50%-ile. This probably only makes sense if the Monoid[A] is equivalent to addition in Numeric[A], which is only used to convert to Double at the end

  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. val level: Int

    Permalink
  15. def lowerBound: Double

    Permalink
  16. val lowerChild: Option[QTree[A]]

    Permalink
  17. def merge(other: QTree[A])(implicit monoid: Monoid[A]): QTree[A]

    Permalink

    This merges with another QTree but DOES NOT compress.

    This merges with another QTree but DOES NOT compress. You should probably never use this and instead use QTreeSemigroup.plus(a, b) or .sumOption. Strongly prefer sumOption if you can, as it is much more efficient due to compressing less frequently.

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

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

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

    Permalink
    Definition Classes
    AnyRef
  21. val offset: Long

    Permalink
  22. def quantileBounds(p: Double): (Double, Double)

    Permalink

    give lower and upper bounds respectively of the percentile value given.

    give lower and upper bounds respectively of the percentile value given. For instance, quantileBounds(0.5) would give an estimate of the median.

  23. def range: Double

    Permalink
  24. def rangeCountBounds(from: Double, to: Double): (Long, Long)

    Permalink

    Return upper and lower bounds on the counts that appear in a given range

  25. def rangeSumBounds(from: Double, to: Double)(implicit monoid: Monoid[A]): (A, A)

    Permalink

    Get the bounds on the sums within a range (not percentile) This along with the rangeCountBounds can tell you the mean over a range

  26. def size: Int

    Permalink

    How many total nodes are there in the QTree.

    How many total nodes are there in the QTree. Not meaningful for learning statistics, but interesting to estimate serialization size.

  27. val sum: A

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

    Permalink
    Definition Classes
    AnyRef
  29. def totalSum(implicit monoid: Monoid[A]): A

    Permalink

    Total sum over the entire tree.

  30. def upperBound: Double

    Permalink
  31. val upperChild: Option[QTree[A]]

    Permalink
  32. final def wait(): Unit

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped