Help text that can be queried interactively: more detail than help
.
Reconstructs a container of known type from JSON.
Help text that can be queried interactively: a one-liner that can be included in a menu.
Name of the concrete Factory
as a string; used to label the container type in JSON.
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,
the following would associate the sum of weights and the sum of squared weights to every bin:
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
throughi9
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
, doBranch.ed(entries, h1, h2, h3, ...)
.To create a
Branching
, doBranch(h1, h2, h3, ...)
.