Core math utilities used across bb4 projects: ranges and axis cut-points, interpolation, 1D functions, combinatorics, complex numbers, linear algebra helpers, and multi-dimensional arrays.
implementation 'com.barrybecker4:bb4-math:2.0.0'See the releases page or Maven Central for newer versions.
MathUtil— GCD/LCM, factorial, combinations/permutations, log10/exp10, and shared epsilon constantsRange— double-precision min/max range with extent, containment, and unit-scale mappingcutpoints— nicely rounded tick/label positions for a numeric range (CutPointGenerator, tight vs. loose labeling)interpolation— interpolate through an array of y-values (linear, cosine, cubic, Hermite, step)function— 1D function types (LinearFunction,LogFunction,ArrayFunction,PiecewiseFunction, GaussianErrorFunction, wave forms, invertibility helpers)combinatorics— memory-efficient iterators over combinations (Combinater) and permutations (Permuter)complex— complex numbers and ranges with arithmetic and exponentiationlinear— N-dimensionalVector, linear utilities, and a conjugate-gradient solver forAx = bmultiarray— arbitrarily dimensioned arrays of doubles with multi-index ↔ flat-index mappingrandom— skewed Gaussian random numbers (SkewedRandom)
See the Building bb4 Projects wiki.
MIT — see LICENSE.