Object

org.dianahep.histogrammar

Branch

Related Doc: package histogrammar

Permalink

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. All

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 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]]]]]]]]]]

    Permalink
  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]]]]]]]]]

    Permalink
  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]]]]]]]]

    Permalink
  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]]]]]]]

    Permalink
  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]]]]]]

    Permalink
  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]]]]]

    Permalink
  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]]]]

    Permalink
  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]]]

    Permalink
  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]]

    Permalink
  13. def apply[C0 <: Container[C0] with Aggregation](i0: C0): Branching[C0, BranchingNil.type]

    Permalink
  14. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def detailedHelp: String

    Permalink

    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]]]]]]]]]]

    Permalink
  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]]]]]]]]]

    Permalink
  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]]]]]]]]

    Permalink
  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]]]]]]]

    Permalink
  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]]]]]]

    Permalink
  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]]]]]

    Permalink
  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]]]]

    Permalink
  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]]]

    Permalink
  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]]

    Permalink
  26. def ed[C0 <: Container[C0] with NoAggregation](entries: Double, i0: C0): Branched[C0, BranchedNil.type]

    Permalink
  27. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  29. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. def fromJsonFragment(json: Json, nameFromParent: Option[String]): Container[_] with NoAggregation

    Permalink

    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
  31. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  32. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  33. def help: String

    Permalink

    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
  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, 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]]]]]]]]]]

    Permalink
  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, 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]]]]]]]]]

    Permalink
  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, 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]]]]]]]]

    Permalink
  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, 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]]]]]]]

    Permalink
  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, 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]]]]]]

    Permalink
  39. 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]]]]]

    Permalink
  40. 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]]]]

    Permalink
  41. 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]]]

    Permalink
  42. 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]]

    Permalink
  43. def ing[C0 <: Container[C0] with Aggregation](i0: C0): Branching[C0, BranchingNil.type]

    Permalink
  44. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  45. def name: String

    Permalink

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

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

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

    Permalink
    Definition Classes
    AnyRef
  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  50. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  51. final def wait(): Unit

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

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

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

Inherited from Factory

Inherited from AnyRef

Inherited from Any

Ungrouped