package histogrammar
Main library for Histogrammar.
Defines all types for the general user, including implicits to construct Histogrammar-specific types from Scala basic types.
A general user is expected to import org.dianahep.histogrammar._
to bring all of these implicits into scope.
- Alphabetic
- By Inheritance
- histogrammar
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package ascii
Methods for drawing familiar combinations of containers, such as histograms, in ASCII art.
- package json
Provides support for parsing and stringifying JSON.
Provides support for parsing and stringifying JSON.
This module is a new implementation; it does not depend on packages such as Jackson. This choice was to provide the following features:
- fewer dependencies, to make it easier to embed Histogrammar
- concise pattern-matching in org.dianahep.histogrammar.Container
fromJsonFragment
methods - special handling of
"-inf"
,"inf"
,"nan"
as numbers, rather than strings - partial parsing failures return
None
, rather than raising exceptions.
- package tutorial
- package util
Supporting functions, mostly called by those in org.dianahep.histogrammar.
Type Members
- trait Aggregation extends AnyRef
Mix-in to add mutability to a org.dianahep.histogrammar.Container.
Mix-in to add mutability to a org.dianahep.histogrammar.Container.
Containers without
Aggregation
can only be merged with the+
operator, but containers withAggregation
can additionally be accumulated withfill
.Containers without
Aggregation
are named as past-tense verbs, such as "Counted" and "Binned", which containers withAggregation
are named with the gerund form, such as "Counting" and "Binning".Aggregation
is parameterized by the fill data typeDatum
, which is an abstract type member rather than a type parameter (square brackets) for better type inference.This data type is implemented as contravariant: a container that expects to be filled with a given data type can accept that data type's subclass.
- trait AggregationOnData extends Aggregation
Sub-trait of org.dianahep.histogrammar.Aggregation for all containers except org.dianahep.histogrammar.Counting.
Sub-trait of org.dianahep.histogrammar.Aggregation for all containers except org.dianahep.histogrammar.Counting.
AggregationOnData
containers actually depend on theirDatum
type;Counting
is the only one that ignores it. - trait AnyQuantity[DATUM, RANGE] extends AnyRef
Trait for aggregations that use a fill rule of any type.
- class Averaged extends Container[Averaged] with NoAggregation with QuantityName
An accumulated weighted mean of a given quantity.
An accumulated weighted mean of a given quantity.
Use the factory org.dianahep.histogrammar.Average to construct an instance.
- class Averaging[DATUM] extends Container[Averaging[DATUM]] with AggregationOnData with NumericalQuantity[DATUM]
Accumulating a weighted mean of a given quantity.
Accumulating a weighted mean of a given quantity.
Use the factory org.dianahep.histogrammar.Average to construct an instance.
- class Bagged[RANGE] extends Container[Bagged[RANGE]] with NoAggregation with QuantityName
An accumulated bag of numbers, vectors of numbers, or strings.
An accumulated bag of numbers, vectors of numbers, or strings.
Use the factory org.dianahep.histogrammar.Bag to construct an instance.
- class Bagging[DATUM, RANGE] extends Container[Bagging[DATUM, RANGE]] with AggregationOnData with AnyQuantity[DATUM, RANGE]
An accumulated bag of numbers, vectors of numbers, or strings.
An accumulated bag of numbers, vectors of numbers, or strings.
Use the factory org.dianahep.histogrammar.Bag to construct an instance.
- class Binned[V <: Container[V] with NoAggregation, U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation] extends Container[Binned[V, U, O, N]] with NoAggregation with QuantityName with Methods
An accumulated quantity that was split into equally spaced bins between specified limits and filling only one bin per datum.
An accumulated quantity that was split into equally spaced bins between specified limits and filling only one bin per datum.
Use the factory org.dianahep.histogrammar.Bin to construct an instance.
- class Binning[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }] extends Container[Binning[DATUM, V, U, O, N]] with AggregationOnData with NumericalQuantity[DATUM] with Methods
Accumulating a quantity by splitting it into equally spaced bins between specified limits and filling only one bin per datum.
Accumulating a quantity by splitting it into equally spaced bins between specified limits and filling only one bin per datum.
Use the factory org.dianahep.histogrammar.Bin to construct an instance.
- class Branched[HEAD <: Container[HEAD] with NoAggregation, TAIL <: BranchedList] extends Container[Branched[HEAD, TAIL]] with NoAggregation with Collection with BranchedList
An accumulated collection of containers of the ANY type, indexed by number.
An accumulated collection of containers of the ANY type, indexed by number.
Use the factory org.dianahep.histogrammar.Branch to construct an instance.
- implicit class Branched0[C0 <: Container[C0] with NoAggregation, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - implicit class Branched1[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - implicit class Branched2[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - implicit class Branched3[C0 <: Container[C0] with NoAggregation, C1 <: Container[C1] with NoAggregation, C2 <: Container[C2] with NoAggregation, C3 <: Container[C3] with NoAggregation, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - implicit class Branched4[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, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - implicit class Branched5[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, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - implicit class Branched6[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, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - implicit class Branched7[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, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - implicit class Branched8[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, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - implicit class Branched9[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, TAIL <: BranchedList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranched
containers. - sealed trait BranchedList extends AnyRef
- class Branching[HEAD <: Container[HEAD] with Aggregation, TAIL <: BranchingList] extends Container[Branching[HEAD, TAIL]] with AggregationOnData with Collection with BranchingList
Accumulating a collection of containers of the ANY type, indexed by number.
Accumulating a collection of containers of the ANY type, indexed by number.
Use the factory org.dianahep.histogrammar.Branch to construct an instance.
- implicit class Branching0[C0 <: Container[C0] with Aggregation, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - implicit class Branching1[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - implicit class Branching2[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - implicit class Branching3[C0 <: Container[C0] with Aggregation, C1 <: Container[C1] with Aggregation, C2 <: Container[C2] with Aggregation, C3 <: Container[C3] with Aggregation, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - implicit class Branching4[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, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - implicit class Branching5[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, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - implicit class Branching6[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, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - implicit class Branching7[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, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - implicit class Branching8[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, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - implicit class Branching9[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, TAIL <: BranchingList] extends AnyRef
Add
i0
,i1
, etc.Add
i0
,i1
, etc. methods toBranching
containers. - sealed trait BranchingList extends AnyRef
- implicit class CategoricalFcn[-DATUM] extends UserFcn[DATUM, String]
Wraps a user's function for extracting strings (categories) from the input data type.
- trait CategoricalQuantity[DATUM] extends AnyQuantity[DATUM, String]
Trait for aggregations that use a categorical (string-valued) fill rule.
- class Categorized[V <: Container[V] with NoAggregation] extends Container[Categorized[V]] with NoAggregation with QuantityName
An accumulated quantity that was split by its categorical (string-based) values, filling only one category per datum.
An accumulated quantity that was split by its categorical (string-based) values, filling only one category per datum.
Use the factory org.dianahep.histogrammar.Categorize to construct an instance.
- class Categorizing[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }] extends Container[Categorizing[DATUM, V]] with AggregationOnData with CategoricalQuantity[DATUM]
Accumulating a quantity by splitting it by its categorical (string-based) value and filling only one category per datum.
Accumulating a quantity by splitting it by its categorical (string-based) value and filling only one category per datum.
Use the factory org.dianahep.histogrammar.Categorize to construct an instance.
- class CentrallyBinned[V <: Container[V] with NoAggregation, N <: Container[N] with NoAggregation] extends Container[CentrallyBinned[V, N]] with NoAggregation with QuantityName with Methods[V]
An accumulated quantity that was split into bins defined by bin centers, filling only one datum per bin with no overflows or underflows.
An accumulated quantity that was split into bins defined by bin centers, filling only one datum per bin with no overflows or underflows.
Use the factory org.dianahep.histogrammar.CentrallyBin to construct an instance.
- class CentrallyBinning[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }] extends Container[CentrallyBinning[DATUM, V, N]] with AggregationOnData with NumericalQuantity[DATUM] with Methods[V]
Accumulating a quantity by splitting it into bins defined by bin centers, filling only one datum per bin with no overflows or underflows.
Accumulating a quantity by splitting it into bins defined by bin centers, filling only one datum per bin with no overflows or underflows.
Use the factory org.dianahep.histogrammar.CentrallyBin to construct an instance.
- trait Collection extends AnyRef
- sealed trait CollectionIndex extends AnyRef
- class CollectionMethods extends AnyRef
Methods that are implicitly added to container combinations that look like (nested) collections.
- class Combine[CONTAINER <: Container[CONTAINER]] extends (CONTAINER, CONTAINER) => CONTAINER with Serializable
Combine function for Apache Spark's
aggregate
method.Combine function for Apache Spark's
aggregate
method.Typical use:
filledHistogram = datasetRDD.aggregate(initialHistogram)(new Increment, new Combine)
wheredatasetRDD
is a collection ofinitialHistogram
'sDatum
type. - trait Container[CONTAINER <: Container[CONTAINER]] extends Serializable
Interface for classes that contain aggregated data, such as "Counted" or "Binned" (immutable) or "Counting" or "Binning" (mutable).
Interface for classes that contain aggregated data, such as "Counted" or "Binned" (immutable) or "Counting" or "Binning" (mutable).
There are two "tenses" of containers: present tense ("Counting", "Binning", etc.) that additionally mix-in org.dianahep.histogrammar.Aggregation and have a
fill
method for accumulating data, and past tense ("Counted", "Binned", etc.) that can only be merged with the+
operator.Containers are monoids: they have a neutral element (
zero
) and an associative operator (+
). Thus, partial sums aggregated in parallel can be combined arbitrarily.The
Container
is parameterized by itself (an example of the curiously recurring template pattern) to pass type information at compile-time. - class ContainerException extends Exception
Exception type for improperly configured containers.
- class Counted extends Container[Counted] with NoAggregation
An accumulated count (sum of weights) of data, ignoring its content.
An accumulated count (sum of weights) of data, ignoring its content.
Use the factory org.dianahep.histogrammar.Count to construct an instance.
- class Counting extends Container[Counting] with Aggregation
Accumulating a count (sum of weights) of data, ignoring its content.
Accumulating a count (sum of weights) of data, ignoring its content.
Use the factory org.dianahep.histogrammar.Count to construct an instance.
This is the only container with org.dianahep.histogrammar.Aggregation that doesn't have a configurable data type: its
Datum
isAny
. It is primarily for the sake of this container thatAggregation
is contravariant. - class Deviated extends Container[Deviated] with NoAggregation with QuantityName
An accumulated weighted variance (and mean) of a given quantity.
An accumulated weighted variance (and mean) of a given quantity.
Use the factory org.dianahep.histogrammar.Deviate to construct an instance.
- class Deviating[DATUM] extends Container[Deviating[DATUM]] with AggregationOnData with NumericalQuantity[DATUM]
Accumulating a weighted variance (and mean) of a given quantity.
Accumulating a weighted variance (and mean) of a given quantity.
Use the factory org.dianahep.histogrammar.Deviate to construct an instance.
- trait Factory extends AnyRef
Interface for a container factory, always named as imperative verbs, such as "Count" and "Bin".
Interface for a container factory, always named as imperative verbs, such as "Count" and "Bin".
Each factory has:
- a custom
apply
method to create an active container than can aggregate data (and is therefore mutable). This active container is named by the gerund form of the verb, such as "Counting" and "Binning". - a custom
ed
method to create a fixed container that cannot aggregate data (immutable), only merge with the+
operator. This fixed container is named by the past tense form of the verb, such as "Counted" and "Binned". - a uniform
fromJsonFragment
method that can reconstruct a fixed (immutable) container from its JSON representation. This is used by theFactory
object'sfromJson
entry point. (Click on the "t" in a circle in the upper-left to see theFactory
object's documentation, rather than theFactory
trait. unapply
methods to unpack active and fixed containers in Scala pattern matching.
- a custom
- class Fractioned[N <: Container[N], D <: Container[D]] extends Container[Fractioned[N, D]] with NoAggregation with QuantityName with Methods
An accumulated pair of containers, one with all data (denominator), and one with data that passed a given selection (numerator).
An accumulated pair of containers, one with all data (denominator), and one with data that passed a given selection (numerator).
Use the factory org.dianahep.histogrammar.Fraction to construct an instance.
- class FractionedHistogramMethods extends AnyRef
Methods that are implicitly added to container combinations that look like fractioned histograms.
- class Fractioning[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }] extends Container[Fractioning[DATUM, V]] with AggregationOnData with NumericalQuantity[DATUM] with Methods
Accumulating a pair of containers, one with all data (denominator), and one with data that passed a given selection (numerator).
Accumulating a pair of containers, one with all data (denominator), and one with data that passed a given selection (numerator).
Use the factory org.dianahep.histogrammar.Fraction to construct an instance.
- class HistogramMethods extends AnyRef
Methods that are implicitly added to container combinations that look like histograms.
- type Histogrammed = Selected[Binned[Counted, Counted, Counted, Counted]]
Type alias for conventional histograms (filled).
- type Histogramming[DATUM] = Selecting[DATUM, Binning[DATUM, Counting, Counting, Counting, Counting]]
Type alias for conventional histograms (filling).
- class Increment[DATUM, CONTAINER <: Container[CONTAINER] with AggregationOnData { type Datum >: DATUM }] extends (CONTAINER, DATUM) => CONTAINER with Serializable
Increment function for Apache Spark's
aggregate
method.Increment function for Apache Spark's
aggregate
method.Typical use:
filledHistogram = datasetRDD.aggregate(initialHistogram)(new Increment, new Combine)
wheredatasetRDD
is a collection ofinitialHistogram
'sDatum
type. - class Indexed[V <: Container[V] with NoAggregation] extends Container[Indexed[V]] with NoAggregation with Collection
An accumulated collection of containers of the SAME type, indexed by number.
An accumulated collection of containers of the SAME type, indexed by number.
Use the factory org.dianahep.histogrammar.Index to construct an instance.
- class Indexing[V <: Container[V] with Aggregation] extends Container[Indexing[V]] with AggregationOnData with Collection
Accumulating a collection of containers of the SAME type, indexed by number.
Accumulating a collection of containers of the SAME type, indexed by number.
Use the factory org.dianahep.histogrammar.Index to construct an instance.
- implicit class IntegerIndex extends CollectionIndex
- class IrregularlyBinned[V <: Container[V] with NoAggregation, N <: Container[N] with NoAggregation] extends Container[IrregularlyBinned[V, N]] with NoAggregation with QuantityName
An accumulated suite of containers, each collecting data between a pair of given cuts on a given quantity.
An accumulated suite of containers, each collecting data between a pair of given cuts on a given quantity.
Use the factory org.dianahep.histogrammar.IrregularlyBin to construct an instance.
- class IrregularlyBinning[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }] extends Container[IrregularlyBinning[DATUM, V, N]] with AggregationOnData with NumericalQuantity[DATUM]
Accumulating a suite of containers, each collecting data between a pair of given bins on a given quantity.
Accumulating a suite of containers, each collecting data between a pair of given bins on a given quantity.
Use the factory org.dianahep.histogrammar.IrregularlyBin to construct an instance.
- class JsonDump extends AnyRef
Persistent JSON output file or named pipe (for use with Histogrammar Watcher (hgwatch)).
- class Labeled[V <: Container[V] with NoAggregation] extends Container[Labeled[V]] with NoAggregation with Collection
An accumulated collection of containers of the SAME type, labeled by strings.
An accumulated collection of containers of the SAME type, labeled by strings.
Use the factory org.dianahep.histogrammar.Label to construct an instance.
- class Labeling[V <: Container[V] with Aggregation] extends Container[Labeling[V]] with AggregationOnData with Collection
Accumulating a collection of containers of the SAME type, labeled by strings.
Accumulating a collection of containers of the SAME type, labeled by strings.
Use the factory org.dianahep.histogrammar.Label to construct an instance.
- class Maximized extends Container[Maximized] with NoAggregation with QuantityName
An accumulated maximum of a given quantity.
An accumulated maximum of a given quantity. If no data are observed, the result is
NaN
.Use the factory org.dianahep.histogrammar.Maximize to construct an instance.
- class Maximizing[DATUM] extends Container[Maximizing[DATUM]] with AggregationOnData with NumericalQuantity[DATUM]
Accumulating the maximum of a given quantity.
Accumulating the maximum of a given quantity. If no data are observed, the result is
NaN
.Use the factory org.dianahep.histogrammar.Maximize to construct an instance.
- class Minimized extends Container[Minimized] with NoAggregation with QuantityName
An accumulated minimum of a given quantity.
An accumulated minimum of a given quantity. If no data are observed, the result is
NaN
.Use the factory org.dianahep.histogrammar.Minimize to construct an instance.
- class Minimizing[DATUM] extends Container[Minimizing[DATUM]] with AggregationOnData with NumericalQuantity[DATUM]
Accumulating the minimum of a given quantity.
Accumulating the minimum of a given quantity. If no data are observed, the result is
NaN
.Use the factory org.dianahep.histogrammar.Minimize to construct an instance.
- implicit class MultivariateFcn[-DATUM] extends UserFcn[DATUM, Vector[Double]]
Wraps a user's function for extracting multidimensional numeric data from the input data type.
- trait NoAggregation extends AnyRef
Mix-in to declare that the org.dianahep.histogrammar.Container is immutable (opposite of org.dianahep.histogrammar.Aggregation).
- implicit class NumberTimesContainer extends AnyRef
- implicit final class Numeq extends AnyVal
Introduces a
===
operator for allDouble
tolerance comparisons.Introduces a
===
operator for allDouble
tolerance comparisons.Custom equality rules:
- NaN == NaN (NaNs are used by some primitives to indicate missing data).
- Infinity == Infinity and -Infinity == -Infinity (naturally, but has to be explicit given the following).
- if org.dianahep.histogrammar.util.relativeTolerance is greater than zero, numbers may differ by this small ratio.
- if org.dianahep.histogrammar.util.absoluteTolerance is greater than zero, numbers may differ by this small difference.
Python's math.isclose algorithm is applied for non-NaNs:
abs(x - y) <= max(relativeTolerance * max(abs(x), abs(y)), absoluteTolerance)
- implicit class NumericalFcnFromBoolean[-DATUM] extends UserFcn[DATUM, Double]
- implicit class NumericalFcnFromByte[-DATUM] extends UserFcn[DATUM, Double]
- implicit class NumericalFcnFromDouble[-DATUM] extends UserFcn[DATUM, Double]
- implicit class NumericalFcnFromFloat[-DATUM] extends UserFcn[DATUM, Double]
- implicit class NumericalFcnFromInt[-DATUM] extends UserFcn[DATUM, Double]
- implicit class NumericalFcnFromLong[-DATUM] extends UserFcn[DATUM, Double]
- implicit class NumericalFcnFromShort[-DATUM] extends UserFcn[DATUM, Double]
- trait NumericalQuantity[DATUM] extends AnyQuantity[DATUM, Double]
Trait for aggregations that use a numerical (double-valued) fill rule.
- class PartitionedHistogramMethods extends AnyRef
Methods that are implicitly added to container combinations that look like partitioned histograms.
- class ProfileErrMethods extends AnyRef
Methods that are implicitly added to container combinations that look like a physicist's "profile plot."
- type ProfileErred = Selected[Binned[Deviated, Counted, Counted, Counted]]
Type alias for a physicist's "profile plot," which is a Profile with variances (filled).
- type ProfileErring[DATUM] = Selecting[DATUM, Binning[DATUM, Deviating[DATUM], Counting, Counting, Counting]]
Type alias for a physicist's "profile plot," which is a Profile with variances (filling).
- class ProfileMethods extends AnyRef
Methods that are implicitly added to container combinations that look like a physicist's "profile plot."
- type Profiled = Selected[Binned[Averaged, Counted, Counted, Counted]]
Type alias for binwise averages (filled).
- type Profiling[DATUM] = Selecting[DATUM, Binning[DATUM, Averaging[DATUM], Counting, Counting, Counting]]
Type alias for binwise averages (filling).
- trait QuantityName extends AnyRef
Mix-in to provide a quantity name for immutable Containers (analogous to org.dianahep.histogrammar.AnyQuantity for mutable Containers).
- class Selected[V <: Container[V] with NoAggregation] extends Container[Selected[V]] with NoAggregation with QuantityName with Methods
An accumulated aggregator of data that passed the cut.
- class Selecting[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }] extends Container[Selecting[DATUM, V]] with AggregationOnData with NumericalQuantity[DATUM] with Methods
Accumulating an aggregator of data that passes a cut.
- class SparselyBinned[V <: Container[V] with NoAggregation, N <: Container[N] with NoAggregation] extends Container[SparselyBinned[V, N]] with NoAggregation with QuantityName with Methods
An accumulated quantity that was split into equally spaced bins, filling only one bin per datum and creating new bins as necessary.
An accumulated quantity that was split into equally spaced bins, filling only one bin per datum and creating new bins as necessary.
Use the factory org.dianahep.histogrammar.SparselyBin to construct an instance.
- class SparselyBinning[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }] extends Container[SparselyBinning[DATUM, V, N]] with AggregationOnData with NumericalQuantity[DATUM] with Methods
Accumulating a quantity by splitting it into equally spaced bins, filling only one bin per datum and creating new bins as necessary.
Accumulating a quantity by splitting it into equally spaced bins, filling only one bin per datum and creating new bins as necessary.
Use the factory org.dianahep.histogrammar.SparselyBin to construct an instance.
- type SparselyHistogrammed = Selected[SparselyBinned[Counted, Counted]]
Type alias for sparsely binned histograms (filled).
- type SparselyHistogramming[DATUM] = Selecting[DATUM, SparselyBinning[DATUM, Counting, Counting]]
Type alias for sparsely binned histograms (filling).
- type SparselyProfileErred = Selected[SparselyBinned[Deviated, Counted]]
Type alias for a physicist's sparsely binned "profile plot," which is a Profile with variances (filled).
- type SparselyProfileErring[DATUM] = Selecting[DATUM, SparselyBinning[DATUM, Deviating[DATUM], Counting]]
Type alias for a physicist's sparsely binned "profile plot," which is a Profile with variances (filling).
- type SparselyProfiled = Selected[SparselyBinned[Averaged, Counted]]
Type alias for sparsely binned binwise averages.
Type alias for sparsely binned binwise averages. (filled).
- type SparselyProfiling[DATUM] = Selecting[DATUM, SparselyBinning[DATUM, Averaging[DATUM], Counting]]
Type alias for sparsely binned binwise averages (filling).
- class Stacked[V <: Container[V], N <: Container[N]] extends Container[Stacked[V, N]] with NoAggregation with QuantityName
An accumulated suite of containers, each collecting data above a given cut on a given quantity.
An accumulated suite of containers, each collecting data above a given cut on a given quantity.
Use the factory org.dianahep.histogrammar.Stack to construct an instance.
- class StackedHistogramMethods extends AnyRef
Methods that are implicitly added to container combinations that look like stacked histograms.
- class Stacking[DATUM, V <: Container[V] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }] extends Container[Stacking[DATUM, V, N]] with AggregationOnData with NumericalQuantity[DATUM]
Accumulating a suite of containers, each collecting data above a given cut on a given quantity.
Accumulating a suite of containers, each collecting data above a given cut on a given quantity.
Use the factory org.dianahep.histogrammar.Stack to construct an instance.
- implicit class StringIndex extends CollectionIndex
- class Summed extends Container[Summed] with NoAggregation with QuantityName
An accumulated weighted sum of a given quantity.
An accumulated weighted sum of a given quantity.
Use the factory org.dianahep.histogrammar.Sum to construct an instance.
- class Summing[DATUM] extends Container[Summing[DATUM]] with AggregationOnData with NumericalQuantity[DATUM]
Accumulating a weighted sum of a given quantity.
Accumulating a weighted sum of a given quantity.
Use the factory org.dianahep.histogrammar.Sum to construct an instance.
- implicit class SymbolIndex extends CollectionIndex
- class TwoDimensionallyHistogramMethods extends AnyRef
Methods that are implicitly added to container combinations that look like two-dimensional histograms.
- type TwoDimensionallyHistogrammed = Selected[Binned[Binned[Counted, Counted, Counted, Counted], Counted, Counted, Counted]]
Type alias for conventional, two-dimensional histograms (filled).
- type TwoDimensionallyHistogramming[DATUM] = Selecting[DATUM, Binning[DATUM, Binning[DATUM, Counting, Counting, Counting, Counting], Counting, Counting, Counting]]
Type alias for conventional, two-dimensional histograms (filling).
- type TwoDimensionallySparselyHistogrammed = Selected[SparselyBinned[Counted, Counted]]
Type alias for sparsely binned, two-dimensional histograms (filled).
- type TwoDimensionallySparselyHistogramming[DATUM] = Selecting[DATUM, SparselyBinning[DATUM, Counting, Counting]]
Type alias for sparsely binned, two-dimensional histograms (filling).
- class UntypedLabeled extends Container[UntypedLabeled] with NoAggregation with Collection
An accumulated collection of containers of any type except org.dianahep.histogrammar.Counted, labeled by strings.
An accumulated collection of containers of any type except org.dianahep.histogrammar.Counted, labeled by strings.
Use the factory org.dianahep.histogrammar.UntypedLabel to construct an instance.
- class UntypedLabeling[F <: Container[F] with Aggregation] extends Container[UntypedLabeling[F]] with AggregationOnData with Collection
Accumulating a collection of containers of any type except org.dianahep.histogrammar.Counting, labeled by strings.
Accumulating a collection of containers of any type except org.dianahep.histogrammar.Counting, labeled by strings.
Use the factory org.dianahep.histogrammar.UntypedLabel to construct an instance.
- class Unweighted[DATUM] extends UserFcn[DATUM, Double]
Default weighting function that always returns 1.0.
- trait UserFcn[-DOMAIN, +RANGE] extends Serializable
Base trait for user functions.
Value Members
- def Histogram[DATUM](num: Int, low: Double, high: Double, quantity: UserFcn[DATUM, Double], selection: UserFcn[DATUM, Double] = unweighted[DATUM]): Selecting[DATUM, Binning[DATUM, Counting, Counting, Counting, Counting]]
Convenience function for creating a conventional histogram.
- def Profile[DATUM](num: Int, low: Double, high: Double, binnedQuantity: UserFcn[DATUM, Double], averagedQuantity: UserFcn[DATUM, Double], selection: UserFcn[DATUM, Double] = unweighted[DATUM]): Selecting[DATUM, Binning[DATUM, Averaging[DATUM], Counting, Counting, Counting]]
Convenience function for creating binwise averages.
- def ProfileErr[DATUM](num: Int, low: Double, high: Double, binnedQuantity: UserFcn[DATUM, Double], averagedQuantity: UserFcn[DATUM, Double], selection: UserFcn[DATUM, Double] = unweighted[DATUM]): Selecting[DATUM, Binning[DATUM, Deviating[DATUM], Counting, Counting, Counting]]
Convenience function for creating a physicist's "profile plot," which is a Profile with variances.
- def SparselyHistogram[DATUM](binWidth: Double, quantity: UserFcn[DATUM, Double], selection: UserFcn[DATUM, Double] = unweighted[DATUM], origin: Double = 0.0): Selecting[DATUM, SparselyBinning[DATUM, Counting, Counting]]
Convenience function for creating a sparsely binned histogram.
- def SparselyProfile[DATUM](binWidth: Double, binnedQuantity: UserFcn[DATUM, Double], averagedQuantity: UserFcn[DATUM, Double], selection: UserFcn[DATUM, Double] = unweighted[DATUM], origin: Double = 0.0): Selecting[DATUM, SparselyBinning[DATUM, Averaging[DATUM], Counting]]
Convenience function for creating sparsely binned binwise averages.
- def SparselyProfileErr[DATUM](binWidth: Double, binnedQuantity: UserFcn[DATUM, Double], averagedQuantity: UserFcn[DATUM, Double], selection: UserFcn[DATUM, Double] = unweighted[DATUM], origin: Double = 0.0): Selecting[DATUM, SparselyBinning[DATUM, Deviating[DATUM], Counting]]
Convenience function for creating a physicist's sparsely binned "profile plot," which is a Profile with variances.
- def TwoDimensionallyHistogram[DATUM](xnum: Int, xlow: Double, xhigh: Double, xquantity: UserFcn[DATUM, Double], ynum: Int, ylow: Double, yhigh: Double, yquantity: UserFcn[DATUM, Double], selection: UserFcn[DATUM, Double] = unweighted[DATUM]): Selecting[DATUM, Binning[DATUM, Binning[DATUM, Counting, Counting, Counting, Counting], Counting, Counting, Counting]]
Convenience function for creating a conventional, two-dimensional histogram.
- def TwoDimensionallySparselyHistogram[DATUM](xbinWidth: Double, xquantity: UserFcn[DATUM, Double], ybinWidth: Double, yquantity: UserFcn[DATUM, Double], selection: UserFcn[DATUM, Double] = unweighted[DATUM], xorigin: Double = 0.0, yorigin: Double = 0.0): Selecting[DATUM, SparselyBinning[DATUM, SparselyBinning[DATUM, Counting, Counting], Counting]]
Convenience function for creating a sparsely binned, two-dimensional histogram.
- implicit def anyBinnedMixedToStackedHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with NoAggregation](hist: Stacked[Binning[DATUM, Counting, U, O, N], SN]): StackedHistogramMethods
- implicit def anyBinnedToFractionedHistogramMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation](hist: Fractioned[Binned[Counted, U, O, N], Binned[Counted, U, O, N]]): FractionedHistogramMethods
- implicit def anyBinnedToHistogramMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation](hist: Binned[Counted, U, O, N]): HistogramMethods
- implicit def anyBinnedToPartitionedHistogramMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation, SN <: Container[SN] with NoAggregation](hist: IrregularlyBinned[Binned[Counted, U, O, N], SN]): PartitionedHistogramMethods
- implicit def anyBinnedToProfileErrMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation](hist: Binned[Deviated, U, O, N]): ProfileErrMethods
- implicit def anyBinnedToProfileMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation](hist: Binned[Averaged, U, O, N]): ProfileMethods
- implicit def anyBinnedToStackedHistogramMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation, SN <: Container[SN] with NoAggregation](hist: Stacked[Binned[Counted, U, O, N], SN]): StackedHistogramMethods
- implicit def anyBinningToFractionedHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Fractioning[DATUM, Binning[DATUM, Counting, U, O, N]]): FractionedHistogramMethods
- implicit def anyBinningToHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Binning[DATUM, Counting, U, O, N]): HistogramMethods
- implicit def anyBinningToPartitionedHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with Aggregation { type Datum >: DATUM }](hist: IrregularlyBinning[DATUM, Binning[DATUM, Counting, U, O, N], SN]): PartitionedHistogramMethods
- implicit def anyBinningToProfileErrMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Binning[DATUM, Deviating[DATUM], U, O, N]): ProfileErrMethods
- implicit def anyBinningToProfileMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Binning[DATUM, Averaging[DATUM], U, O, N]): ProfileMethods
- implicit def anyBinningToStackedHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with Aggregation { type Datum >: DATUM }](hist: Stacking[DATUM, Binning[DATUM, Counting, U, O, N], SN]): StackedHistogramMethods
- implicit def anySelectedBinnedMixedToStackedHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with NoAggregation](hist: Stacked[Selecting[DATUM, Binning[DATUM, Counting, U, O, N]], SN]): StackedHistogramMethods
- implicit def anySelectedBinnedToFractionedHistogramMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation](hist: Fractioned[Selected[Binned[Counted, U, O, N]], Selected[Binned[Counted, U, O, N]]]): FractionedHistogramMethods
- implicit def anySelectedBinnedToHistogramMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation](hist: Selected[Binned[Counted, U, O, N]]): HistogramMethods
- implicit def anySelectedBinnedToPartitionedHistogramMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation, SN <: Container[SN] with NoAggregation](hist: IrregularlyBinned[Selected[Binned[Counted, U, O, N]], SN]): PartitionedHistogramMethods
- implicit def anySelectedBinnedToProfileErrMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation](hist: Selected[Binned[Deviated, U, O, N]]): ProfileErrMethods
- implicit def anySelectedBinnedToProfileMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation](hist: Selected[Binned[Averaged, U, O, N]]): ProfileMethods
- implicit def anySelectedBinnedToStackedHistogramMethods[U <: Container[U] with NoAggregation, O <: Container[O] with NoAggregation, N <: Container[N] with NoAggregation, SN <: Container[SN] with NoAggregation](hist: Stacked[Selected[Binned[Counted, U, O, N]], SN]): StackedHistogramMethods
- implicit def anySelectedSparselyBinnedMixedToStackedHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with NoAggregation](hist: Stacked[Selecting[DATUM, SparselyBinning[DATUM, Counting, N]], SN]): StackedHistogramMethods
- implicit def anySelectedSparselyBinnedToFractionedHistogramMethods[N <: Container[N] with NoAggregation](hist: Fractioned[Selected[SparselyBinned[Counted, N]], Selected[SparselyBinned[Counted, N]]]): FractionedHistogramMethods
- implicit def anySelectedSparselyBinnedToHistogramMethods[N <: Container[N] with NoAggregation](hist: Selected[SparselyBinned[Counted, N]]): HistogramMethods
- implicit def anySelectedSparselyBinnedToPartitionedHistogramMethods[N <: Container[N] with NoAggregation, SN <: Container[SN] with NoAggregation](hist: IrregularlyBinned[Selected[SparselyBinned[Counted, N]], SN]): PartitionedHistogramMethods
- implicit def anySelectedSparselyBinnedToProfileErrMethods[N <: Container[N] with NoAggregation](hist: Selected[SparselyBinned[Deviated, N]]): ProfileErrMethods
- implicit def anySelectedSparselyBinnedToProfileMethods[N <: Container[N] with NoAggregation](hist: Selected[SparselyBinned[Averaged, N]]): ProfileMethods
- implicit def anySelectedSparselyBinnedToStackedHistogramMethods[N <: Container[N] with NoAggregation, SN <: Container[SN] with NoAggregation](hist: Stacked[Selected[SparselyBinned[Counted, N]], SN]): StackedHistogramMethods
- implicit def anySelectingBinningToFractionedHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Fractioning[DATUM, Selecting[DATUM, Binning[DATUM, Counting, U, O, N]]]): FractionedHistogramMethods
- implicit def anySelectingBinningToHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Selecting[DATUM, Binning[DATUM, Counting, U, O, N]]): HistogramMethods
- implicit def anySelectingBinningToPartitionedHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with Aggregation { type Datum >: DATUM }](hist: IrregularlyBinning[DATUM, Selecting[DATUM, Binning[DATUM, Counting, U, O, N]], SN]): PartitionedHistogramMethods
- implicit def anySelectingBinningToProfileErrMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Selecting[DATUM, Binning[DATUM, Deviating[DATUM], U, O, N]]): ProfileErrMethods
- implicit def anySelectingBinningToProfileMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Selecting[DATUM, Binning[DATUM, Averaging[DATUM], U, O, N]]): ProfileMethods
- implicit def anySelectingBinningToStackedHistogramMethods[DATUM, U <: Container[U] with Aggregation { type Datum >: DATUM }, O <: Container[O] with Aggregation { type Datum >: DATUM }, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with Aggregation { type Datum >: DATUM }](hist: Stacking[DATUM, Selecting[DATUM, Binning[DATUM, Counting, U, O, N]], SN]): StackedHistogramMethods
- implicit def anySelectingSparselyBinningToFractionedHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Fractioning[DATUM, Selecting[DATUM, SparselyBinning[DATUM, Counting, N]]]): FractionedHistogramMethods
- implicit def anySelectingSparselyBinningToHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Selecting[DATUM, SparselyBinning[DATUM, Counting, N]]): HistogramMethods
- implicit def anySelectingSparselyBinningToPartitionedHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with Aggregation { type Datum >: DATUM }](hist: IrregularlyBinning[DATUM, Selecting[DATUM, SparselyBinning[DATUM, Counting, N]], SN]): PartitionedHistogramMethods
- implicit def anySelectingSparselyBinningToProfileErrMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Selecting[DATUM, SparselyBinning[DATUM, Deviating[DATUM], N]]): ProfileErrMethods
- implicit def anySelectingSparselyBinningToProfileMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Selecting[DATUM, SparselyBinning[DATUM, Averaging[DATUM], N]]): ProfileMethods
- implicit def anySelectingSparselyBinningToStackedHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with Aggregation { type Datum >: DATUM }](hist: Stacking[DATUM, Selecting[DATUM, SparselyBinning[DATUM, Counting, N]], SN]): StackedHistogramMethods
- implicit def anySparselyBinnedMixedToStackedHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with NoAggregation](hist: Stacked[SparselyBinning[DATUM, Counting, N], SN]): StackedHistogramMethods
- implicit def anySparselyBinnedToFractionedHistogramMethods[N <: Container[N] with NoAggregation](hist: Fractioned[SparselyBinned[Counted, N], SparselyBinned[Counted, N]]): FractionedHistogramMethods
- implicit def anySparselyBinnedToHistogramMethods[N <: Container[N] with NoAggregation](hist: SparselyBinned[Counted, N]): HistogramMethods
- implicit def anySparselyBinnedToPartitionedHistogramMethods[N <: Container[N] with NoAggregation, SN <: Container[SN] with NoAggregation](hist: IrregularlyBinned[SparselyBinned[Counted, N], SN]): PartitionedHistogramMethods
- implicit def anySparselyBinnedToProfileErrMethods[N <: Container[N] with NoAggregation](hist: SparselyBinned[Deviated, N]): ProfileErrMethods
- implicit def anySparselyBinnedToProfileMethods[N <: Container[N] with NoAggregation](hist: SparselyBinned[Averaged, N]): ProfileMethods
- implicit def anySparselyBinnedToStackedHistogramMethods[N <: Container[N] with NoAggregation, SN <: Container[SN] with NoAggregation](hist: Stacked[SparselyBinned[Counted, N], SN]): StackedHistogramMethods
- implicit def anySparselyBinningToFractionedHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: Fractioning[DATUM, SparselyBinning[DATUM, Counting, N]]): FractionedHistogramMethods
- implicit def anySparselyBinningToHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: SparselyBinning[DATUM, Counting, N]): HistogramMethods
- implicit def anySparselyBinningToPartitionedHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with Aggregation { type Datum >: DATUM }](hist: IrregularlyBinning[DATUM, SparselyBinning[DATUM, Counting, N], SN]): PartitionedHistogramMethods
- implicit def anySparselyBinningToProfileErrMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: SparselyBinning[DATUM, Deviating[DATUM], N]): ProfileErrMethods
- implicit def anySparselyBinningToProfileMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }](hist: SparselyBinning[DATUM, Averaging[DATUM], N]): ProfileMethods
- implicit def anySparselyBinningToStackedHistogramMethods[DATUM, N <: Container[N] with Aggregation { type Datum >: DATUM }, SN <: Container[SN] with Aggregation { type Datum >: DATUM }](hist: Stacking[DATUM, SparselyBinning[DATUM, Counting, N], SN]): StackedHistogramMethods
- implicit def binnedToTwoDimensionallyHistogramMethods[UX <: Container[UX] with NoAggregation, OX <: Container[OX] with NoAggregation, NX <: Container[NX] with NoAggregation, UY <: Container[UY] with NoAggregation, OY <: Container[OY] with NoAggregation, NY <: Container[NY] with NoAggregation](hist: Binned[Binned[Counted, UY, OY, NY], UX, OX, NX]): TwoDimensionallyHistogramMethods
- implicit def binningToTwoDimensionallyHistogramMethods[DATUM, UX <: Container[UX] with Aggregation { type Datum >: DATUM }, OX <: Container[OX] with Aggregation { type Datum >: DATUM }, NX <: Container[NX] with Aggregation { type Datum >: DATUM }, UY <: Container[UY] with Aggregation { type Datum >: DATUM }, OY <: Container[OY] with Aggregation { type Datum >: DATUM }, NY <: Container[NY] with Aggregation { type Datum >: DATUM }](hist: Binning[DATUM, Binning[DATUM, Counting, UY, OY, NY], UX, OX, NX]): TwoDimensionallyHistogramMethods
- implicit def branchedToCollectionMethods(branched: Branched[_, _]): CollectionMethods
- implicit def branchingToCollectionMethods(branching: Branching[_, _]): CollectionMethods
- def help: String
Help function for interactive use.
Help function for interactive use. Used to discover container types.
- implicit def indexedToCollectionMethods(indexed: Indexed[_]): CollectionMethods
- implicit def indexingToCollectionMethods(indexing: Indexing[_]): CollectionMethods
- implicit def labeledToCollectionMethods(labeled: Labeled[_]): CollectionMethods
- implicit def labelingToCollectionMethods(labeling: Labeling[_]): CollectionMethods
- implicit def selectedBinnedToTwoDimensionallyHistogramMethods[UX <: Container[UX] with NoAggregation, OX <: Container[OX] with NoAggregation, NX <: Container[NX] with NoAggregation, UY <: Container[UY] with NoAggregation, OY <: Container[OY] with NoAggregation, NY <: Container[NY] with NoAggregation](hist: Selected[Binned[Binned[Counted, UY, OY, NY], UX, OX, NX]]): TwoDimensionallyHistogramMethods
- implicit def selectedSparselyBinnedToTwoDimensionallyHistogramMethods[NX <: Container[NX] with NoAggregation, NY <: Container[NY] with NoAggregation](hist: Selected[SparselyBinned[SparselyBinned[Counted, NY], NX]]): TwoDimensionallyHistogramMethods
- implicit def selectingBinningToTwoDimensionallyHistogramMethods[DATUM, UX <: Container[UX] with Aggregation { type Datum >: DATUM }, OX <: Container[OX] with Aggregation { type Datum >: DATUM }, NX <: Container[NX] with Aggregation { type Datum >: DATUM }, UY <: Container[UY] with Aggregation { type Datum >: DATUM }, OY <: Container[OY] with Aggregation { type Datum >: DATUM }, NY <: Container[NY] with Aggregation { type Datum >: DATUM }](hist: Selecting[DATUM, Binning[DATUM, Binning[DATUM, Counting, UY, OY, NY], UX, OX, NX]]): TwoDimensionallyHistogramMethods
- implicit def selectingSparselyBinningToTwoDimensionallyHistogramMethods[DATUM, NX <: Container[NX] with Aggregation { type Datum >: DATUM }, NY <: Container[NY] with Aggregation { type Datum >: DATUM }](hist: Selecting[DATUM, SparselyBinning[DATUM, SparselyBinning[DATUM, Counting, NY], NX]]): TwoDimensionallyHistogramMethods
- implicit def sparselyBinnedToTwoDimensionallyHistogramMethods[NX <: Container[NX] with NoAggregation, NY <: Container[NY] with NoAggregation](hist: SparselyBinned[SparselyBinned[Counted, NY], NX]): TwoDimensionallyHistogramMethods
- implicit def sparselyBinningToTwoDimensionallyHistogramMethods[DATUM, NX <: Container[NX] with Aggregation { type Datum >: DATUM }, NY <: Container[NY] with Aggregation { type Datum >: DATUM }](hist: SparselyBinning[DATUM, SparselyBinning[DATUM, Counting, NY], NX]): TwoDimensionallyHistogramMethods
- implicit def untypedLabeledToCollectionMethods(untypedLabeled: UntypedLabeled): CollectionMethods
- implicit def untypedLabelingToCollectionMethods(untypedLabeling: UntypedLabeling[_]): CollectionMethods
- def unweighted[DATUM]: Unweighted[DATUM]
Default weighting function that always returns 1.0.
- object Average extends Factory
Accumulate the weighted mean of a given quantity.
Accumulate the weighted mean of a given quantity.
Uses the numerically stable weighted mean algorithm described in Tony Finch, "Incremental calculation of weighted mean and variance" Univeristy of Cambridge Computing Service, 2009.
Factory produces mutable org.dianahep.histogrammar.Averaging and immutable org.dianahep.histogrammar.Averaged objects.
- object Bag extends Factory
Accumulate raw numbers, vectors of numbers, or strings, with identical values merged.
Accumulate raw numbers, vectors of numbers, or strings, with identical values merged.
A bag is the appropriate data type for scatter plots: a container that collects raw values, maintaining multiplicity but not order. (A "bag" is also known as a "multiset.") Conceptually, it is a mapping from distinct raw values to the number of observations: when two instances of the same raw value are observed, one key is stored and their weights add.
Although the user-defined function may return scalar numbers, fixed-dimension vectors of numbers, or categorical strings, it may not mix range types. For the purposes of Label and Index (which can only collect aggregators of a single type), bags with different ranges are different types.
Factory produces mutable org.dianahep.histogrammar.Bagging and immutable org.dianahep.histogrammar.Bagged objects.
- object Bin extends Factory
Split a quantity into equally spaced bins between a low and high threshold and fill exactly one bin per datum.
Split a quantity into equally spaced bins between a low and high threshold and fill exactly one bin per datum.
When composed with org.dianahep.histogrammar.Count, this produces a standard histogram:
Bin.ing(100, 0, 10, fill_x, Count.ing())
and when nested, it produces a two-dimensional histogram:
Bin.ing(100, 0, 10, fill_x, Bin.ing(100, 0, 10, fill_y, Count.ing()))
Combining with org.dianahep.histogrammar.Deviate produces a physicist's "profile plot:"
Bin.ing(100, 0, 10, fill_x, Deviate.ing(fill_y))
and so on.
Factory produces mutable org.dianahep.histogrammar.Binning and immutable org.dianahep.histogrammar.Binned objects.
- object Branch extends Factory
Accumulate aggregators of different types, indexed by i0 through i9.
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
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, ...)
. - object BranchedNil extends BranchedList with Serializable
- object BranchingNil extends BranchingList with Serializable
- object Categorize extends Factory
Split a given quantity by its categorical value and fill only one category per datum.
Split a given quantity by its categorical value and fill only one category per datum.
A bar chart may be thought of as a histogram with string-valued (categorical) bins, so this is the equivalent of org.dianahep.histogrammar.Bin for bar charts. The order of the strings is deferred to the visualization stage.
Unlike org.dianahep.histogrammar.SparselyBin, this aggregator has the potential to use unlimited memory. A large number of distinct categories can generate many unwanted bins.
Factory produces mutable org.dianahep.histogrammar.Categorizing and immutable org.dianahep.histogrammar.Categorized objects.
- object CentrallyBin extends Factory
Split a quantity into bins defined by irregularly spaced bin centers, with exactly one sub-aggregator filled per datum (the closest one).
Split a quantity into bins defined by irregularly spaced bin centers, with exactly one sub-aggregator filled per datum (the closest one).
Unlike irregular bins defined by explicit ranges, irregular bins defined by bin centers are guaranteed to fully partition the space with no gaps and no overlaps. It could be viewed as cluster scoring in one dimension.
Factory produces mutable org.dianahep.histogrammar.CentrallyBinning and immutable org.dianahep.histogrammar.CentrallyBinned objects.
- object Count extends Factory
Count entries by accumulating the sum of all observed weights or a sum of transformed weights (e.g.
Count entries by accumulating the sum of all observed weights or a sum of transformed weights (e.g. sum of squares of weights).
An optional
transform
function can be applied to the weights before summing. To accumulate the sum of squares of weights, use{x: Double => x*x}
, for instance. This is unlike any other primitive'squantity
function in that its domain is the weights (always double), not data (any type).Factory produces mutable org.dianahep.histogrammar.Counting and immutable org.dianahep.histogrammar.Counted objects.
- object Deviate extends Factory
Accumulate the weighted mean and weighted variance of a given quantity.
Accumulate the weighted mean and weighted variance of a given quantity.
The variance is computed around the mean, not zero.
Uses the numerically stable weighted mean and weighted variance algorithms described in Tony Finch, "Incremental calculation of weighted mean and variance" Univeristy of Cambridge Computing Service, 2009.
Factory produces mutable org.dianahep.histogrammar.Deviating and immutable org.dianahep.histogrammar.Deviated objects.
- object Factory
Entry point for constructing containers from JSON and centralized registry of container types.
Entry point for constructing containers from JSON and centralized registry of container types.
Containers filled in Python or on remote sites are serialized as JSON that the
Factory
object can reconstruct. Reconstructed containers are fixed (immutable, cannot aggregate), but can be merged with the+
operator. (Click on the "o" in a circle in the upper-left to see theFactory
trait's documentation, which explains the difference.)To do this, the
Factory
object must dispatch JSON to the appropriate container for interpretation. It therefore manages a global registry of container types (concrete instances of theFactory
trait). General users are not expected to add to this registry, but they could if they want to. - object Fraction extends Factory
Accumulate two aggregators, one containing only entries that pass a given selection (numerator) and another that contains all entries (denominator).
Accumulate two aggregators, one containing only entries that pass a given selection (numerator) and another that contains all entries (denominator).
The aggregator may be a simple org.dianahep.histogrammar.Count to measure the efficiency of a cut, a org.dianahep.histogrammar.Bin to plot a turn-on curve, or anything else to be tested with and without a cut.
As a side effect of NaN values returning false for any comparison, a NaN return value from the selection is treated as a failed cut (the denominator is filled but the numerator is not).
Factory produces mutable org.dianahep.histogrammar.Fractioning and immutable org.dianahep.histogrammar.Fractioned objects.
- object Index extends Factory
Accumulate any number of aggregators of the same type in a list.
Accumulate any number of aggregators of the same type in a list. Every sub-aggregator is filled with every input datum.
This primitive provides an anonymous collection of aggregators (unless the integer index is taken to have special meaning, but generally such bookkeeping should be encoded in strings). Indexes can be nested to create two-dimensional ordinal grids of aggregators. (Use org.dianahep.histogrammar.Bin if the space is to have a metric interpretation.)
Note that all sub-aggregators within an Index must have the same type (e.g. histograms of different binnings, but all histograms). To collect objects of different types, still indexed by integer, use org.dianahep.histogrammar.Branch.
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.Indexing and immutable org.dianahep.histogrammar.Indexed objects.
- object IntegerIndex
- object IrregularlyBin extends Factory
Accumulate a suite of aggregators, each between two thresholds, filling exactly one per datum.
Accumulate a suite of aggregators, each between two thresholds, filling exactly one per datum.
This is a variation on org.dianahep.histogrammar.Stack, which fills
N + 1
aggregators withN
successively tighter cut thresholds. IrregularlyBin fillsN + 1
aggregators in the non-overlapping intervals betweenN
thresholds.IrregularlyBin is also similar to org.dianahep.histogrammar.CentrallyBin, in that they both partition a space into irregular subdomains with no gaps and no overlaps. However, CentrallyBin is defined by bin centers and IrregularlyBin is defined by bin edges, the first and last of which are at negative and positive infinity.
Factory produces mutable org.dianahep.histogrammar.IrregularlyBinning and immutable org.dianahep.histogrammar.IrregularlyBinned objects.
- object Label extends Factory
Accumulate any number of aggregators of the same type and label them with strings.
Accumulate any number of aggregators of the same type and label them with strings. Every sub-aggregator is filled with every input datum.
This primitive simulates a directory of aggregators. For sub-directories, nest collections within the Label collection.
Note that all sub-aggregators within a Label must have the same type (e.g. histograms of different binnings, but all histograms). To collect objects of different types with string-based look-up keys, use org.dianahep.histogrammar.UntypedLabel.
To collect aggregators of the same type without naming them, use org.dianahep.histogrammar.Index. To collect aggregators of different types without naming them, use org.dianahep.histogrammar.Branch.
In strongly typed languages, the restriction to a single type allows nested objects to be extracted without casting.
Factory produces mutable org.dianahep.histogrammar.Labeling and immutable org.dianahep.histogrammar.Labeled objects.
- object Maximize extends Factory
Find the maximum value of a given quantity.
Find the maximum value of a given quantity. If no data are observed, the result is NaN.
Factory produces mutable org.dianahep.histogrammar.Maximizing and immutable org.dianahep.histogrammar.Maximized objects.
- object Minimize extends Factory
Find the minimum value of a given quantity.
Find the minimum value of a given quantity. If no data are observed, the result is NaN.
Factory produces mutable org.dianahep.histogrammar.Minimizing and immutable org.dianahep.histogrammar.Minimized objects.
- object Select extends Factory
Filter or weight data according to a given selection.
Filter or weight data according to a given selection.
This primitive is a basic building block, intended to be used in conjunction with anything that needs a user-defined cut. In particular, a standard histogram often has a custom selection, and this can be built by nesting Select -> Bin -> Count.
Select also resembles org.dianahep.histogrammar.Fraction, but without the
denominator
.The efficiency of a cut in a Select aggregator named
x
is simplyx.cut.entries / x.entries
(because all aggregators have anentries
member).Factory produces mutable org.dianahep.histogrammar.Selecting and immutable org.dianahep.histogrammar.Selected (sic) objects.
- object SparselyBin extends Factory
Split a quantity into equally spaced bins, creating them whenever their
entries
would be non-zero.Split a quantity into equally spaced bins, creating them whenever their
entries
would be non-zero. Exactly one sub-aggregator is filled per datum.Use this when you have a distribution of known scale (bin width) but unknown domain (lowest and highest bin index).
Unlike fixed-domain binning, this aggregator has the potential to use unlimited memory. A large number of distinct outliers can generate many unwanted bins.
Like fixed-domain binning, the bins are indexed by integers, though they are 64-bit and may be negative. Bin indexes below
-(2**63 - 1)
are put in the-(2**63 - 1)
are bin and indexes above(2**63 - 1)
are put in the(2**63 - 1)
bin.Factory produces mutable org.dianahep.histogrammar.SparselyBinning and immutable org.dianahep.histogrammar.SparselyBinned objects.
- object Stack extends Factory
Accumulates a suite of aggregators, each filtered with a tighter selection on the same quantity.
Accumulates a suite of aggregators, each filtered with a tighter selection on the same quantity.
This is a generalization of org.dianahep.histogrammar.Fraction, which fills two aggregators, one with a cut, the other without. Stack fills
N + 1
aggregators withN
successively tighter cut thresholds. The first is always filled (like the denominator of Fraction), the second is filled if the computed quantity exceeds its threshold, the next is filled if the computed quantity exceeds a higher threshold, and so on.The thresholds are presented in increasing order and the computed value must be greater than or equal to a threshold to fill the corresponding bin, and therefore the number of entries in each filled bin is greatest in the first and least in the last.
Although this aggregation could be visualized as a stack of histograms, stacked histograms usually represent a different thing: data from different sources, rather than different cuts on the same source. For example, it is common to stack Monte Carlo samples from different backgrounds to show that they add up to the observed data. The Stack aggregator does not make plots of this type because aggregation trees in Histogrammar draw data from exactly one source.
To make plots from different sources in Histogrammar, one must perform separate aggregation runs. It may then be convenient to stack the results of those runs as though they were created with a Stack aggregation, so that plotting code can treat both cases uniformly. For this reason, Stack has an alternate constructor to build a Stack manually from distinct aggregators, even if those aggregators came from different aggregation runs.
Factory produces mutable org.dianahep.histogrammar.Stacking and immutable org.dianahep.histogrammar.Stacked objects.
- object StringIndex
- object Sum extends Factory
Accumulate the (weighted) sum of a given quantity, calculated from the data.
Accumulate the (weighted) sum of a given quantity, calculated from the data.
Sum differs from org.dianahep.histogrammar.Count in that it computes a quantity on the spot, rather than percolating a product of weight metadata from nested primitives. Also unlike weights, the sum can add both positive and negative quantities (weights are always non-negative).
Factory produces mutable org.dianahep.histogrammar.Summing and immutable org.dianahep.histogrammar.Summed objects.
- object SymbolIndex
- object UntypedLabel extends Factory
Accumulate any number of aggregators of any type and label them with strings.
Accumulate any number of aggregators of any type and label them with strings. Every sub-aggregator is filled with every input datum.
This primitive simulates a directory of aggregators. For sub-directories, nest collections within the UntypedLabel.
Note that sub-aggregators within an UntypedLabel may have different types. In strongly typed languages, this flexibility poses a problem: nested objects must be type-cast before they can be used. To collect objects of the same type with string-based look-up keys, use org.dianahep.histogrammar.Label.
To collect aggregators of the same type without naming them, use org.dianahep.histogrammar.Index. To collect aggregators of different types without naming them, use org.dianahep.histogrammar.Branch.
Factory produces mutable org.dianahep.histogrammar.UntypedLabeling and immutable org.dianahep.histogrammar.UntypedLabeled objects.
Note: the compiler cannot predict the type of data that is drawn from this collection, so it must be cast with
as
. - object Version