histogrammar / histogrammar-scala

Scala implementation of Histogrammar, with optional front-ends and back-ends as separate Maven projects.

Version Matrix

Scala implementation of Histogrammar


See https://histogrammar.github.io/histogrammar-docs for a complete introduction to Histogrammar.

This is a Scala implementation for Scala versions 2.10, 2.11 and 2.12.

Last update: January 2021.


Histogrammar has a standard Maven POM. With Maven 3+, run

mvn install -P scala-2.10


mvn install -P scala-2.11


mvn install -P scala-2.12

in the base directory (to compile everything) or one of the subdirectories. All subdirectories depend on core, so this must be installed first.


Build status

The Scala implementation is verified against the Python implementation by running exactly the same tests on both. They agree numerically to one part in a trillion, with the same NaN/infinity handling, and exchange the same JSON.

All primitives except UntypedLabel preserve type information in the Scala REPL, so you can extract values or tab-complete without casting.

In the future, JIT-compilation will be available, similar to the ROOT/Cling interface in Python, but compiling to Java bytecode with Janino instead of native bytecode with LLVM.

Primitive Scala JVM JIT
Count done
Sum done
Average done
Deviate done
Minimize done
Maximize done
Bag done
Bin done
SparselyBin done
CentrallyBin done
IrregularlyBin done
Categorize done
Fraction done
Stack done
Select done
Label done
UntypedLabel done
Index done
Branch done