Packages

object Branch extends Factory

Accumulate aggregators of different types, indexed by i0 through i9. Every sub-aggregator is filled with every input datum.

This primitive provides an anonymous collection of aggregators of different types, usually for gluing together various statistics. For instance, if the following associates a sum of weights to every bin in a histogram,

Bin.ing(100, 0, 1, {d: Datum => d.x},
  Sum.ing({d: Datum => d.weight}))

the following would associate the sum of weights and the sum of squared weights to every bin:

Bin.ing(100, 0, 1, {d: Datum => d.x},
  Branch.ing(Sum.ing({d: Datum => d.weight}),
             Sum.ing({d: Datum => d.weight*d.weight})))

Branch is a basic building block for complex aggregators. The limitation to ten branches, indexed from i0 to i9, is a concession to type inference in statically typed languages. It is not a fundamental limit, but the type-metaprogramming becomes increasingly complex as branches are added. Error messages may be convoluted as the compiler presents internals of the type-metaprogramming in response to a user's simple mistake.

Therefore, individual implementations may allow more than ten branches, but the Histogrammar standard only requires ten.

To collect an unlimited number of aggregators of the same type without naming them, use org.dianahep.histogrammar.Index. To collect aggregators of the same type with string-based labels, use org.dianahep.histogrammar.Label. To collect aggregators of different types with string-based labels, use org.dianahep.histogrammar.UntypedLabel.

Factory produces mutable org.dianahep.histogrammar.Branching and immutable org.dianahep.histogrammar.Branched objects.

Note: there is nothing intrinsic about the limit of 10 items. The data themselves are stored in a linked list (in value space and type space) and index fields i0 through i9 are added implicitly to lists of type-length 2 through 10, respectively. Longer lists can be created by adding more implicit methods.

To create a Branched, do Branch.ed(entries, h1, h2, h3, ...).

To create a Branching, do Branch(h1, h2, h3, ...).

Linear Supertypes
Factory, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Branch
  2. Factory
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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 apply[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation, C6 <: Container[C6] with Aggregation, C7 <: Container[C7] with Aggregation, C8 <: Container[C8] with Aggregation, C9 <: Container[C9] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6, i7: C7, i8: C8, i9: C9)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5], e06: Compatible[C0, C6], e07: Compatible[C0, C7], e08: Compatible[C0, C8], e09: Compatible[C0, C9]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, Branching[C6, Branching[C7, Branching[C8, Branching[C9, BranchingNil.type]]]]]]]]]]
  5. def apply[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation, C6 <: Container[C6] with Aggregation, C7 <: Container[C7] with Aggregation, C8 <: Container[C8] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6, i7: C7, i8: C8)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5], e06: Compatible[C0, C6], e07: Compatible[C0, C7], e08: Compatible[C0, C8]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, Branching[C6, Branching[C7, Branching[C8, BranchingNil.type]]]]]]]]]
  6. def apply[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation, C6 <: Container[C6] with Aggregation, C7 <: Container[C7] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6, i7: C7)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5], e06: Compatible[C0, C6], e07: Compatible[C0, C7]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, Branching[C6, Branching[C7, BranchingNil.type]]]]]]]]
  7. def apply[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation, C6 <: Container[C6] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5], e06: Compatible[C0, C6]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, Branching[C6, BranchingNil.type]]]]]]]
  8. def apply[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, BranchingNil.type]]]]]]
  9. def apply[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, BranchingNil.type]]]]]
  10. def apply[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, BranchingNil.type]]]]
  11. def apply[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation](i0: C0, i1: C1, i2: C2)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2]): Branching[C0, Branching[C1, Branching[C2, BranchingNil.type]]]
  12. def apply[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation](i0: C0, i1: C1)(implicit e01: Compatible[C0, C1]): Branching[C0, Branching[C1, BranchingNil.type]]
  13. def apply[C0 <: Container[C0] with Aggregation](i0: C0): Branching[C0, BranchingNil.type]
  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  16. def detailedHelp: String

    Help text that can be queried interactively: more detail than help.

    Help text that can be queried interactively: more detail than help. (FIXME: currently only contains the apply signature.)

    Definition Classes
    BranchFactory
  17. def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation, C3 <: Container[C3] with NoAggregation, C4 <: Container[C4] with NoAggregation, C5 <: Container[C5] with NoAggregation, C6 <: Container[C6] with NoAggregation, C7 <: Container[C7] with NoAggregation, C8 <: Container[C8] with NoAggregation, C9 <: Container[C9] with NoAggregation](entries: Double, i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6, i7: C7, i8: C8, i9: C9): Branched[C0, Branched[C1, Branched[C2, Branched[C3, Branched[C4, Branched[C5, Branched[C6, Branched[C7, Branched[C8, Branched[C9, BranchedNil.type]]]]]]]]]]
  18. def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation, C3 <: Container[C3] with NoAggregation, C4 <: Container[C4] with NoAggregation, C5 <: Container[C5] with NoAggregation, C6 <: Container[C6] with NoAggregation, C7 <: Container[C7] with NoAggregation, C8 <: Container[C8] with NoAggregation](entries: Double, i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6, i7: C7, i8: C8): Branched[C0, Branched[C1, Branched[C2, Branched[C3, Branched[C4, Branched[C5, Branched[C6, Branched[C7, Branched[C8, BranchedNil.type]]]]]]]]]
  19. def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation, C3 <: Container[C3] with NoAggregation, C4 <: Container[C4] with NoAggregation, C5 <: Container[C5] with NoAggregation, C6 <: Container[C6] with NoAggregation, C7 <: Container[C7] with NoAggregation](entries: Double, i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6, i7: C7): Branched[C0, Branched[C1, Branched[C2, Branched[C3, Branched[C4, Branched[C5, Branched[C6, Branched[C7, BranchedNil.type]]]]]]]]
  20. def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation, C3 <: Container[C3] with NoAggregation, C4 <: Container[C4] with NoAggregation, C5 <: Container[C5] with NoAggregation, C6 <: Container[C6] with NoAggregation](entries: Double, i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6): Branched[C0, Branched[C1, Branched[C2, Branched[C3, Branched[C4, Branched[C5, Branched[C6, BranchedNil.type]]]]]]]
  21. def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation, C3 <: Container[C3] with NoAggregation, C4 <: Container[C4] with NoAggregation, C5 <: Container[C5] with NoAggregation](entries: Double, i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5): Branched[C0, Branched[C1, Branched[C2, Branched[C3, Branched[C4, Branched[C5, BranchedNil.type]]]]]]
  22. def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation, C3 <: Container[C3] with NoAggregation, C4 <: Container[C4] with NoAggregation](entries: Double, i0: C0, i1: C1, i2: C2, i3: C3, i4: C4): Branched[C0, Branched[C1, Branched[C2, Branched[C3, Branched[C4, BranchedNil.type]]]]]
  23. def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation, C3 <: Container[C3] with NoAggregation](entries: Double, i0: C0, i1: C1, i2: C2, i3: C3): Branched[C0, Branched[C1, Branched[C2, Branched[C3, BranchedNil.type]]]]
  24. def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation](entries: Double, i0: C0, i1: C1, i2: C2): Branched[C0, Branched[C1, Branched[C2, BranchedNil.type]]]
  25. def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation](entries: Double, i0: C0, i1: C1): Branched[C0, Branched[C1, BranchedNil.type]]
  26. def ed[C0 <: Container[C0] with NoAggregation](entries: Double, i0: C0): Branched[C0, BranchedNil.type]
  27. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  29. def fromJsonFragment(json: Json, nameFromParent: Option[String]): Container[_] with NoAggregation

    Reconstructs a container of known type from JSON.

    Reconstructs a container of known type from JSON. General users should call the Factory object's fromJson, which uses header data to identify the container type. (This is called by fromJson.)

    Definition Classes
    BranchFactory
  30. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  31. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  32. def help: String

    Help text that can be queried interactively: a one-liner that can be included in a menu.

    Help text that can be queried interactively: a one-liner that can be included in a menu.

    Definition Classes
    BranchFactory
  33. def ing[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation, C6 <: Container[C6] with Aggregation, C7 <: Container[C7] with Aggregation, C8 <: Container[C8] with Aggregation, C9 <: Container[C9] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6, i7: C7, i8: C8, i9: C9)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5], e06: Compatible[C0, C6], e07: Compatible[C0, C7], e08: Compatible[C0, C8], e09: Compatible[C0, C9]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, Branching[C6, Branching[C7, Branching[C8, Branching[C9, BranchingNil.type]]]]]]]]]]
  34. def ing[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation, C6 <: Container[C6] with Aggregation, C7 <: Container[C7] with Aggregation, C8 <: Container[C8] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6, i7: C7, i8: C8)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5], e06: Compatible[C0, C6], e07: Compatible[C0, C7], e08: Compatible[C0, C8]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, Branching[C6, Branching[C7, Branching[C8, BranchingNil.type]]]]]]]]]
  35. def ing[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation, C6 <: Container[C6] with Aggregation, C7 <: Container[C7] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6, i7: C7)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5], e06: Compatible[C0, C6], e07: Compatible[C0, C7]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, Branching[C6, Branching[C7, BranchingNil.type]]]]]]]]
  36. def ing[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation, C6 <: Container[C6] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5, i6: C6)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5], e06: Compatible[C0, C6]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, Branching[C6, BranchingNil.type]]]]]]]
  37. def ing[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation, C5 <: Container[C5] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4, i5: C5)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4], e05: Compatible[C0, C5]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, Branching[C5, BranchingNil.type]]]]]]
  38. def ing[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, C4 <: Container[C4] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3, i4: C4)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3], e04: Compatible[C0, C4]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, Branching[C4, BranchingNil.type]]]]]
  39. def ing[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation](i0: C0, i1: C1, i2: C2, i3: C3)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2], e03: Compatible[C0, C3]): Branching[C0, Branching[C1, Branching[C2, Branching[C3, BranchingNil.type]]]]
  40. def ing[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation](i0: C0, i1: C1, i2: C2)(implicit e01: Compatible[C0, C1], e02: Compatible[C0, C2]): Branching[C0, Branching[C1, Branching[C2, BranchingNil.type]]]
  41. def ing[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation](i0: C0, i1: C1)(implicit e01: Compatible[C0, C1]): Branching[C0, Branching[C1, BranchingNil.type]]
  42. def ing[C0 <: Container[C0] with Aggregation](i0: C0): Branching[C0, BranchingNil.type]
  43. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  44. def name: String

    Name of the concrete Factory as a string; used to label the container type in JSON.

    Name of the concrete Factory as a string; used to label the container type in JSON.

    Definition Classes
    BranchFactory
  45. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  46. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  47. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  48. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  49. def toString(): String
    Definition Classes
    AnyRef → Any
  50. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  51. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  52. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Factory

Inherited from AnyRef

Inherited from Any

Ungrouped