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, ...)
.
- Alphabetic
- By Inheritance
- Branch
- Factory
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- 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]]]]]]]]]]
- 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]]]]]]]]]
- 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]]]]]]]]
- 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]]]]]]]
- 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]]]]]]
- 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]]]]]
- 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]]]]
- 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]]]
- 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]]
- def apply[C0 <: Container[C0] with Aggregation](i0: C0): Branching[C0, BranchingNil.type]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def detailedHelp: String
Help text that can be queried interactively: more detail than
help
. - 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]]]]]]]]]]
- 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]]]]]]]]]
- 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]]]]]]]]
- 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]]]]]]]
- 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]]]]]]
- 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]]]]]
- 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]]]]
- 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]]]
- def ed[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation](entries: Double, i0: C0, i1: C1): Branched[C0, Branched[C1, BranchedNil.type]]
- def ed[C0 <: Container[C0] with NoAggregation](entries: Double, i0: C0): Branched[C0, BranchedNil.type]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fromJsonFragment(json: Json, nameFromParent: Option[String]): Container[_] with NoAggregation
Reconstructs a container of known type from JSON.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def help: String
Help text that can be queried interactively: a one-liner that can be included in a menu.
- 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]]]]]]]]]]
- 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]]]]]]]]]
- 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]]]]]]]]
- 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]]]]]]]
- 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]]]]]]
- 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]]]]]
- 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]]]]
- 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]]]
- 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]]
- def ing[C0 <: Container[C0] with Aggregation](i0: C0): Branching[C0, BranchingNil.type]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def name: String
Name of the concrete
Factory
as a string; used to label the container type in JSON. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)