scalanlp/breeze
55.3
Adequate · 27 September 2026
47.7k
lines of production code
Scala
primary language
4
measurements over time
What this system is
Breeze is a numerical processing library for Scala that provides core linear algebra, statistical, and optimization capabilities. It supports dense and sparse matrix operations, signal processing, and various statistical distributions and hypothesis tests. The system also includes tools for optimization, interpolation, and data visualization, with a focus on performance through benchmarking and efficient data structures.
How it got here
2008–2012 — Breeze 2.x architecture and feature expansion
18 changes.
This period established the foundational structure for Breeze 2.x, migrating the build system to SBT and supporting Scala 3 while removing legacy ScalaNLP modules. It introduced a comprehensive new algebraic hierarchy, a registry-based UFunc dispatch system, and core linear algebra data structures with broadcasting support. The release also added extensive numerical utilities, specialized sparse collections, and a standalone visualization library backed by JFreeChart.
2013–2014 — Mathematical and statistical expansion
21 changes.
This period focused on significantly expanding Breeze's mathematical capabilities by introducing comprehensive packages for signal processing, optimization, interpolation, and numerical integration. It also enriched the statistical toolkit with extensive distribution implementations, hypothesis testing, and MCMC sampling, while adding robust linear algebra decompositions and regression methods. Concurrently, the project established a rigorous performance benchmarking suite and restructured the build system to support these new modules.
2015–2021 — Scala 3 support and mathematical expansion
19 changes.
This period focused on extending Breeze's compatibility to Scala 3 and Scala 2.13 through dedicated compatibility layers and macro support. It also significantly expanded the library's mathematical capabilities by introducing new optimization solvers, quasi-Monte Carlo integration, signal processing tools, and optimized linear algebra operators.
Features
Add FeatureVector for efficient binary feature operations
Introduces a new FeatureVector class in the breeze.features package to represent sparse indicator (binary) features. This type enables optimized dot products and matrix multiplications with dense and sparse vectors/matrices, allowing users to perform linear algebra operations on feature sets more efficiently than with standard dense representations.
math/src/main/codegen/breeze/features · high confidence
Add Lasso regression and single-precision support for Least Squares
The regression package now includes a new Lasso (L1-regularized) regression implementation that computes sparsified least squares solutions and reports R-squared values. Additionally, the existing Least Squares regression has been extended to support single-precision (Float) data types alongside the existing double-precision support, with separate implementation paths for both types. The underlying linear algebra backend has also been switched from com.github.fommil.netlib to dev.ludovic.netlib.
math/src/main/scala/breeze/stats/regression · high confidence
Add descriptive statistics operations for dense matrices
The \DescriptiveStats.scala\ codegen file introduces implementations for computing mean, mean and variance, and accumulation/count operations. These changes enable statistical computations over dense matrices and vectors by leveraging the \CanTraverseValues\ interface, allowing users to calculate these metrics efficiently on large datasets.
math/src/main/codegen/breeze/stats · high confidence
Add hypothesis testing utilities for t-tests and chi-squared tests
The \breeze.stats.hypothesis\ package now provides statistical hypothesis testing functions. Users can perform two-tailed Welch's t-tests and one-sample t-tests via \tTest\, which return p-values based on the calculated t-statistic and degrees of freedom. Additionally, \chi2Test\ is available for comparing proportions between a control and one or more variants using a chi-squared test, including support for Sidak-corrected p-values to account for multiple comparisons.
math/src/main/scala/breeze/stats/hypothesis · high confidence
Added Breeze-compatible array and sorting utilities
The \math/src/main/codegen/breeze/util\ package now includes \ArrayUtil\, \Sorting\, and \Selecting\ utilities ported from Breeze. \ArrayUtil\ provides optimized, type-specific implementations for array operations such as \fill\, \copyOf\, \sort\, and \equals\ (including a \nonstupidEquals\ that correctly handles floating-point -0.0). \Sorting\ adds an \indirectSort\ method for jointly sorting key-value arrays in-place. \Selecting\ introduces \quickSelect\ and \quickSelectImpl\ for linear-time selection of elements (e.g., medians) from arrays and collections.
math/src/main/codegen/breeze/util · high confidence
Added Metropolis-Hastings MCMC benchmark
A new benchmark file has been added to the Breeze MCMC package to measure the performance of Metropolis-Hastings sampling algorithms. The benchmark includes tests for standard sampling, sampling with computational work, and threaded buffered sampling to demonstrate threading speedups.
benchmark/src/main/scala/breeze/stats/mcmc · high confidence
Added Scala 2.13+ compatible collection implementations and utilities
This change introduces a new source directory for Scala 2.13+ that provides compatibility and performance improvements for the math library. It includes new immutable and mutable collection types such as \Beam\ (a bounded priority queue) and \BinomialHeap\, a \RingBuffer\ for circular buffering, and an \AutoUpdater\ for maps with default values. Additionally, it adds specialized \ArrayBuilder\ implementations for efficient array construction, a \Counter2KeySet\ and \Counter2ProjectionMap\ for sparse matrix operations, and a \ScalaVersion\ utility to detect the runtime version.
_math/src/main/scala\2.13+ · high confidence
Added cubic and linear univariate interpolation capabilities
Users can now perform univariate interpolation using two new classes: CubicInterpolator, which fits a cubic spline to at least three data points, and LinearInterpolator, which supports linear interpolation and extrapolation for generic types. These classes are integrated into the Breeze API via a new UnivariateInterpolator trait and a HandyUnivariateInterpolator base class, allowing interpolators to be used as functions (e.g., interpolator(x)) and supporting both in-domain interpolation and out-of-domain extrapolation.
math/src/main/scala/breeze/interpolation · high confidence
Added polynomial evaluation support for vectors and matrices
Users can now evaluate polynomials on DenseVector and DenseMatrix inputs using the new \densePolyval\ UFunc. This feature implements Horner's method for efficient evaluation, with specific handling for square matrices to ensure mathematical correctness.
math/src/main/scala/breeze/polynomial · high confidence
Added probabilistic monad benchmark suite
A new benchmark file (ProbMonad.scala) has been added to the stats benchmark module to measure the performance of probabilistic monadic operations. It includes tests for monadic composition (for-comprehensions), raw random draws, mapping, repeated mapping, flat mapping, conditioning, and drawing with optional results, allowing users to track performance changes in these statistical distribution operations.
benchmark/src/main/scala/breeze/stats · high confidence
Added quasi-Monte Carlo integration with Halton sequences
New files in the \breeze.integrate.quasimontecarlo\ package introduce quasi-Monte Carlo integration capabilities, starting with the Halton sequence generator (\Halton.scala\) and a base generator trait (\QuasiMonteCarloGenerator.scala\). The package also provides \TransformedQuasiMonteCarloGenerator.scala\ for transforming these uniform sequences into specific distributions (e.g., via inverse CDF or rejection sampling for Gamma distributions) and a \package.scala\ that exposes convenient implicit conversions for \HasInverseCdf\ objects to use as quasi-random variable specs.
math/src/main/scala/breeze/integrate/quasimontecarlo · high confidence
Added signal processing support for convolution, median filtering, and FIR filter design
This change introduces new support files for the Breeze signal processing library, enabling users to perform convolution on dense vectors with configurable padding and overhang options, apply optimized median filters with sliding windows, and design FIR filters using the firwin algorithm with various window functions. These additions provide the underlying implementation delegates for these core signal processing operations.
math/src/main/codegen/breeze/signal · high confidence
Initial release of breeze-viz visualization library
The viz module is introduced as a standalone visualization library backed by Breeze and JFreeChart. This addition provides core plotting capabilities, including the creation of Figures with configurable dimensions and subplot layouts, and the ability to add named Series to Plots. Users can generate line and scatter plots with support for custom colors, shapes, labels, and tooltips. The library also supports log-scale axes, histogram binning, and exporting figures to PNG, EPS, and PDF formats.
viz · high confidence
Initial repository structure and documentation for Breeze 2.x
This change establishes the foundational project files for the Breeze numerical processing library, setting the version to 2.1.0. It introduces standard configuration and documentation files including .gitignore, .scalafmt.conf, DEVELOP.md, LICENSE, NOTICE, and README.md, while removing the legacy build.xml file. The README notes that the library is largely retired but accepts bug fixes, and specifies support for Scala 3.1, 2.12, and 2.13.
(repo-wide) · high confidence
Introduction of Breeze Macros module with Scala 2 and Scala 3 support
The macros module has been added to the project, providing compile-time code generation capabilities for the Breeze library. This includes the \cforRange\ and \cforRange2\ macros for optimized loop generation, and \assert\, \require\, and \assume\ macros that provide enhanced error messages. The implementation supports both Scala 2 (using \scala.reflect.macros\) and Scala 3 (using \scala.quoted\), with specific implementations in \scala\_2\ and \scala\_3\ source directories. Additionally, the module includes the \arityize\ macro for generating code up to arity 22, and utility traits like \NotGiven\ and \&:&\ for type-level programming.
macros · high confidence
Introduction of a new algebraic hierarchy and Complex number support in breeze.math
The \breeze.math\ package has been restructured to introduce a comprehensive algebraic type hierarchy, including traits for \Semiring\, \Ring\, \Field\, \Module\, and \VectorSpace\ (along with their mutable and normed variants). This change adds a new \Complex\ number implementation with full arithmetic support (including \log\, \exp\, and \pow\), and provides \Field\ instances for standard numeric types (\Int\, \Double\, \Float\, etc.). Additionally, it introduces \LogDouble\ for numerical stability in log-space calculations, \MatrixNorms\ for computing matrix norms, and a \MutablizingAdaptor\ to seamlessly wrap immutable vector spaces with mutable operations.
math/src/main/scala/breeze/math · high confidence
Introduction of core linear algebra data structures and broadcasting support
The \breeze.linalg\ package now includes foundational data structures for numerical computing, specifically \DenseMatrix\, \DenseVector\, \CSCMatrix\ (Compressed Sparse Column), \BitVector\, \Counter\, and \Counter2\. Additionally, the library introduces an explicit broadcasting mechanism via \Broadcasted\, \BroadcastedRows\, and \BroadcastedColumns\ traits, allowing users to apply operations across matrix rows and columns similar to NumPy's broadcasting semantics.
math/src/main/scala/breeze/linalg · high confidence
Introduction of new sparse and triangular array implementations
Added new mutable collection classes to the math module: OpenAddressHashArray, a sparse array backed by a linear-probing open address hash table; SparseArray, a sparse representation using a two-array binary-search approach; and TriangularArray, a jagged 2-D array optimized for structures like parse charts. These classes provide specialized storage and iteration capabilities for sparse data, including methods for active element iteration, mapping, filtering, and compacting.
math/src/main/scala/breeze/collection · high confidence
New IO utilities for CSV, file streams, and binary data
This change introduces new file I/O capabilities to the Breeze math module. Users can now read and write CSV files using the OpenCSV library via the new CSVReader and CSVWriter objects. The FileStreams object provides convenient, buffered input and output streams that automatically handle GZIP compression based on file extensions. Additionally, a new RandomAccessFile wrapper is added, offering typed read/write methods for various integer sizes (including unsigned 64-bit integers via spire.math.ULong) and bulk read operations for improved performance over standard Java I/O.
math/src/main/scala/breeze/io · high confidence
New Metropolis-Hastings MCMC implementation with threaded random number generation
The MCMC package now includes a new Metropolis-Hastings implementation featuring base traits and concrete classes like ArbitraryMetropolisHastings and AffineStepMetropolisHastings, which support burn-in periods, thinning, and statistical tracking. A key addition is ThreadedBufferedRand, a background-threaded random number generator designed to improve performance by pre-generating random values in a buffer, addressing previous concerns about unnecessary object creation during proposal steps.
math/src/main/scala/breeze/stats/mcmc · high confidence
New ODE integration methods and numerical quadrature in breeze.integrate
The \breeze.integrate\ package now provides new capabilities for solving ordinary differential equations (ODEs) and performing numerical integration. Users can solve ODEs using the \ode45\ convenience function or by directly instantiating specific integrators such as \DormandPrince54Integrator\, \DormandPrince853Integrator\, \AdamsBashforthIntegrator\, \AdamsMoultonIntegrator\, \GraggBulirschStoerIntegrator\, and \HighamHall54Integrator\. These integrators wrap Apache Commons Math 3 implementations and accept error tolerances as \DenseVector\[Double\]\ for per-state control. Additionally, the package exposes \trapezoid\ and \simpson\ functions for standard numerical quadrature of single-variable functions.
math/src/main/scala/breeze/integrate · high confidence
New collection data structures and compatibility utilities
This change introduces several new collection types to the Breeze math library, including immutable and mutable implementations of a Beam (a bounded priority queue), an immutable BinomialHeap, a mutable RingBuffer, and an AutoUpdater map wrapper. It also adds a compatibility package providing \arraySeqBuilder\ to support \scala.collection.compat\. These additions expand the available data structures for users working with ordered sequences, bounded heaps, and circular buffers within the library.
_math/src/main/scala\_2.11\2.12/breeze/collection · high confidence
New distribution implementations and Apache Commons Math wrappers
This release adds several new statistical distribution implementations to the Breeze math library, including Bernoulli, Beta, Binomial, Cauchy, ChiSquared, Dirichlet, Exponential, FDistribution, Gamma, Gaussian, Geometric, Gumbel, Hypergeometric, InvGamma, InvWishart, Laplace, Levy, and LogNormal. Many of these distributions (Cauchy, FDistribution, Hypergeometric, Levy) are implemented as wrappers around Apache Commons Math 3 distributions via new \ApacheContinuousDistribution\ and \ApacheDiscreteDistribution\ traits, providing consistent interfaces for PDF, CDF, inverse CDF, and sampling. Other distributions like Beta, Gamma, and Gaussian are implemented natively with support for moments, sufficient statistics, and maximum likelihood estimation as part of the ExponentialFamily trait framework.
math/src/main/scala/breeze/stats/distributions · high confidence
New internal collection views for sparse matrix and counter operations
Added three new internal classes to the Breeze linear algebra package to support efficient iteration and modification of sparse data structures. Counter2KeySet provides a set view over the non-zero keys of a two-key counter, Counter2ProjectionMap offers a mutable map view projecting a specific column from a two-key counter, and MatrixKeySet represents the valid index space of a dense matrix. These components enable more efficient access patterns for sparse matrix and counter operations without exposing the underlying storage details.
_math/src/main/scala\_2.11\2.12/breeze/linalg · high confidence
New linear algebra and numerical utility functions
This update introduces a suite of new linear algebra and numerical operations to the Breeze library. Key additions include vector and matrix padding capabilities (CanPadLeft/Right) with modes for zero, max, min, mean, median, wrap, and reflect; element-wise comparison with tolerance via isclose; and pseudo-inverse calculation (pinv) with configurable singular value cutoff. The diff also adds array sorting and selection utilities (argsort, argtopk), discrete difference calculations (diff), and financial functions such as net present value, internal rate of return, and payment amortization schedules. Additionally, it provides generic type conversion (convert), element-wise scaling and addition (scaleAdd), and optimized implementations for sum, product, max, and min operations.
math/src/main/codegen/breeze/linalg · high confidence
New linear algebra functions and distance metrics added to Breeze math
This change introduces a comprehensive suite of new linear algebra operations and distance metrics to the Breeze math library. Users can now perform LU, Cholesky, QR (including reduced mode), and eigenvalue decompositions (eig, eigSym, evdr) on matrices, as well as compute determinants, condition numbers, and matrix inverses. Additionally, new distance functions are available for comparing vectors, including Euclidean, Manhattan, Chebyshev, Minkowski, and cosine distances. The update also adds utility functions for matrix manipulation such as reshape, diag, fliplr, flipud, rot90, kron, and mpow, along with logical reduction functions like all and any.
math/src/main/scala/breeze/linalg/functions · high confidence
New linear optimization and matching algorithms in breeze.optimize.linear
The \breeze.optimize.linear\ package now includes several new solvers and algorithms: an AffineScaling solver for linear programming, an InteriorPoint solver for LPs, a DSL-based LinearProgram interface, a ConjugateGradient solver for constrained quadratic minimization, a Non-Negative Least Squares (NNLS) solver with state reuse, a PowerMethod for computing eigenvalues, and algorithms for bipartite matching (KuhnMunkres and CompetitiveLinking).
math/src/main/scala/breeze/optimize/linear · high confidence
New numerical utilities and scientific constants
This change introduces several new capabilities to the numerics package. It adds Bessel functions (i0, i1) for mathematical modeling, integer power operations (ipow) for efficient integer exponentiation, and Scaling utilities to help manage numerical precision and avoid underflow in array operations. Additionally, it provides a comprehensive database of CODATA2010 physical constants and standard scientific constants (such as Pi, E, Boltzmann constant, and Avogadro number) for use in scientific computations, along with basic temperature conversion functions.
math/src/main/scala/breeze/numerics · high confidence
New operator implementations for BitVector, CSCMatrix, and other vector/matrix types
This change introduces a comprehensive set of new operator implementations for Breeze's linear algebra types, specifically adding support for BitVector (including logical operations like AND/OR/XOR, dot products, and axpy), CSCMatrix (including copying, mapping, iteration, and arithmetic), and expanded operators for DenseVector, SparseVector, HashVector, and VectorBuilder. These new files in the operators package define the implicit conversions and function implementations that enable standard mathematical operations (addition, subtraction, multiplication, etc.) on these data structures, effectively completing the operator coverage for the library's core vector and matrix types.
math/src/main/codegen/breeze/linalg/operators · high confidence
New optimization algorithms and infrastructure in breeze.optimize
The optimization package introduces several new first-order minimizers and supporting utilities: AdaDeltaGradientDescent for adaptive stochastic optimization, AdaptiveGradientDescent with L1 and L2 regularization variants, and ApproximateGradientFunction for finite-difference gradient estimation. Line search capabilities are expanded with BacktrackingLineSearch and StrongWolfeLineSearch, while DiffFunction gains operator overloads (add, sub, mul, div) and L2 regularization wrappers. BatchDiffFunction enables batch-wise evaluation and stochastic scanning, and CachedDiffFunction provides result caching. FirstOrderMinimizer is refactored to accept configurable ConvergenceCheck instances, and GradientTester offers empirical gradient validation via finite differences.
math/src/main/scala/breeze/optimize · high confidence
New proximal optimization solvers and constraint types
This change introduces a new \breeze.optimize.proximal\ package containing \NonlinearMinimizer\ and \QuadraticMinimizer\ solvers that support proximal operators and constraints such as L1, L2, box, positivity, and probability simplex via the new \Constraint\ enumeration and \Proximal\ trait. It also adds utility generators (\LinearGenerator\, \LogisticGenerator\, \QpGenerator\) for creating test data and problem instances, and updates the underlying linear algebra dependency from \com.github.fommil.netlib\ to \dev.ludovic.netlib\.
math/src/main/scala/breeze/optimize/proximal · high confidence
New random number generation constructors for vectors and matrices
Users can now generate random DenseVectors and DenseMatrices using the new \randomDouble\, \randomInt\, and \randn\ functions. These constructors support generating single values, 1D vectors, and 2D matrices, with optional range parameters for bounded random values. The implementation leverages \RandBasis\ for underlying random number generation, allowing users to control the random state and distribution source.
math/src/main/scala/breeze/linalg/constructors · high confidence
New signal processing API with Java-compatible wrappers and filter design options
The \breeze.signal\ package now exposes a comprehensive set of digital signal processing functions, including discrete Fourier transforms (\fourierTr\, \iFourierTr\), frequency shifting (\fourierShift\, \iFourierShift\), convolution, correlation, and FIR filtering (\filterBP\, \filterBS\, \filterLP\, \filterHP\). To support Java, Matlab, and Mathematica users, a new \JavaCompatible\ object provides array-based wrappers for these operations. The package also introduces a new \options.scala\ file defining configuration options for filter design, such as window functions (Hamming, Hanning, Blackman), convolution overhangs, and padding strategies, alongside a \rootMeanSquare\ function for computing the RMS of vectors.
math/src/main/scala/breeze/signal · high confidence
New signal processing support components for filter design and transforms
This change introduces a new \breeze.signal.support\ package containing the foundational traits and implementations for signal processing features. It adds support for designing FIR decimation filters (\CanDesignFilterDecimation\), applying generic filtering operations (\CanFilter\), and executing bandpass/bandstop and lowpass/highpass filtering (\CanFilterBPBS\, \CanFilterLPHP\). It also includes implementations for Fast Haar Transform (\CanHaarTr\) and its inverse (\CanIHaarTr\), utility classes for 1D FIR and IIR filter kernels (\FilterKernels\), and standard window functions like Hamming, Blackman, and Hanning (\WindowFunctions\). Additionally, it provides a thread-safe wrapper for the JTransforms library (\JTransformsSupport\) to handle FFT operations.
math/src/main/scala/breeze/signal/support · high confidence
New statistical and randomization utilities added to Breeze stats
This update introduces several new capabilities to the \breeze.stats\ package. Users can now calculate the mode of a dataset via the new \DescriptiveStats.mode()\ method, which returns results wrapped in a \ModeResult\ case class. A \RandomizationTest\ class has been added to perform statistical significance testing between two systems on the same dataset using randomization/permutation tests. Additionally, the histogram functionality (\hist\) has been reorganized to remove unnecessary dependencies, and a \HaltonSequence\ quasi-random number generator is now available in \breeze.stats.random\ for use in sampling and integration tasks.
math/src/main/scala/breeze/stats · high confidence
New support traits for tensor and collection operations
The \breeze.linalg.support\ package now includes a comprehensive set of capability traits that enable generic operations on Breeze tensors and collections. These additions allow users to perform axis-based operations (collapsing, iterating, traversing), element-wise transformations (mapping, zipping, transforming values), and structural manipulations (copying, slicing, transposing) in a type-safe manner. New view classes like \TensorActive\, \TensorKeys\, \TensorValues\, and \TensorPairs\ provide convenient access to specific parts of a tensor, while \RangeExtender\ improves indexing flexibility. This refactoring establishes the foundational infrastructure for the library's unified function (UFunc) system.
math/src/main/scala/breeze/linalg/support · high confidence
New utility classes for indexing, encoding, and data structures
The \breeze.util\ package now includes several new utility classes to support data manipulation and serialization. \Index\ and \MutableIndex\ provide efficient bidirectional mappings between integers and objects, with \HashIndex\ as the primary implementation. \Encoder\ facilitates the conversion between counters and vectors, while \BloomFilter\ offers an approximate set for caching and approximation. Additional additions include \TopK\ for maintaining the top K elements, \Interner\ for object interning, \Isomorphism\ and \IsomorphismIndex\ for type transformations, and \CachedHashCode\ for immutable case classes. Serialization support is enhanced with \UpdateSerializedObjects\ and improved handling in \package.scala\.
math/src/main/scala/breeze/util · high confidence
Removals
Removal of legacy Newton optimization and Numerics utility functions
The \Newton\ object, which provided a simple Newton-Raphson optimization routine, and the \Numerics\ object, containing implementations for digamma, log-gamma, and log-sum-exp calculations, have been removed from the \scalanlp.math\ package. This change eliminates these specific mathematical utilities from the library.
src/scalanlp/math · high confidence
Removal of legacy ScalaNLP statistical distribution classes
The \scalanlp.stats\ package has removed several core statistical distribution and inference classes, including \ConjugatePrior\, \Dirichlet\, \Distribution\, \Gamma\, \Multinomial\, \ParticleFilter\, and \Rand\. This deletion eliminates the previous implementations for probability distributions, random number generation, and sequential Monte Carlo (particle filtering) logic from this module.
src/scalanlp/stats · high confidence
Removal of legacy scalanlp counters implementation
The entire \src/scalanlp/counters\ module has been deleted, removing the legacy Scala-based counter library. This includes the core \Counters\ utility object, generic counter traits (\IntCounter\, \DoubleCounter\, \FloatCounter\, \LongCounter\, \ShortCounter\), specialized type-pair counters (e.g., \Double2DoubleCounter\), and paired counters (\PairedIntCounter\, \PairedDoubleCounter\). Users relying on these classes for counting operations will need to migrate to the replacement implementation provided in other parts of the codebase.
src/scalanlp/counters · high confidence
Removed GenCounter code generation script
The \scripts/GenCounter.scala\ file, which was used to automatically generate various counter class implementations based on key and value types, has been deleted. This removes the build-time code generation step for these specific counter variants.
scripts · high confidence
Behavioural changes
Added Scala 2 compatibility layer for implicit conversions and literal row support
This change introduces Scala 2-specific compatibility code to ensure correct behavior when compiling with Scala 2, distinct from Scala 3. It adds a \Scala3Compat\ object that defines \ConversionOrSubtype\ and \Conversion\ types and implicits to manage implicit search behavior specific to Scala 2. Additionally, it adds a \LiteralRow\ trait and its implementations for arrays, dense vectors, sequences, value types, and tuples, enabling the construction of matrix literals from various collection types in the Scala 2 build.
_math/src/main/scala\2 · high confidence
Added Scala 2.13 compatibility shims for array building and version detection
The library now includes compatibility shims to support Scala 2.13 alongside existing 2.11 and 2.12 versions. A new \ArrayBuilder\ implementation has been added to \breeze.util\, providing specialized builders for primitive types (byte, short, int, long, float, double, boolean, char) and reference types, ensuring efficient array construction compatible with Scala 2.13's collection changes. Additionally, a \ScalaVersion\ utility object was introduced to expose a boolean flag (\is213\) for runtime version detection, allowing the codebase to conditionally handle version-specific behaviors.
_math/src/main/scala\_2.11\2.12/breeze/util · high confidence
Build system updated to SBT 1.5.5 with Scala 3.4.2 support
The project build has been reconfigured to use SBT version 1.5.5 and now supports cross-compilation for Scala 3.4.2 alongside Scala 2.12.19 and 2.13.14. This update centralizes build configuration in \project/Build.scala\, enabling the project to compile against Scala 3 source directories (\scala\_3\) and adjust compiler options and source directories based on the target version. Additionally, the build now includes plugins for API mappings, Git integration, Sonatype publishing, and PGP signing, while removing older Scala 2.11 support.
project · high confidence
Introduction of Caliper-based benchmarking infrastructure
The Breeze benchmark suite has been migrated to use the Google Caliper framework. This change introduces a new \BreezeBenchmark\ trait that provides helper methods for running benchmark iterations and explicitly defines an implicit \RandBasis\ for random number generation, alongside a \MyRunner\ class to execute benchmarks via Caliper's main entry point.
benchmark/src/main/scala/breeze/benchmark · high confidence
Introduction of multimethod-based UFunc system
The library introduces a new universal function (UFunc) framework in the \breeze.generic\ package, replacing the previous implicit-based dispatch with a multimethod registry. This change adds \Multimethod.scala\ and \UFunc.scala\, enabling dynamic, reflection-based method resolution that supports in-place operations, sink-based processing, and optimized handling of sparse data (zero-preserving UFuncs). Users will experience more consistent behavior for element-wise operations and improved performance for specific vector types due to the new caching and resolution logic.
math/src/main/scala/breeze/generic · high confidence
Optimized dense vector dot product calculations
The dense vector dot product operations for both double and float types have been optimized for performance. The implementation now uses loop unrolling for larger vectors and specialized, unrolled logic for small vectors (length \< 8), resulting in faster computation times for these common cases.
math/src/main/java · high confidence
Refactor storage defaults and interfaces for specialization support
The storage layer in \breeze.storage\ has been restructured to support better type specialization and configurable defaults. The \DefaultArrayValue\ trait has been renamed to \Zero\, providing explicit zero-value instances for primitive types (Int, Long, Double, etc.) and types with Semiring instances. A new \ConfigurableDefault\ trait allows storage implementations to use custom default values instead of just zeros, enabling more flexible array initialization. Additionally, the \Storage\ trait now explicitly defines \activeSize\ and \iterableSize\ to distinguish between logical element counts and physical allocation sizes, which is critical for hash-backed storage implementations.
math/src/main/scala/breeze/storage · high confidence
Refactored linear algebra operators to use a new registry-based dispatch system
The linear algebra operator implementations in the \breeze.linalg.operators\ package have been restructured to use a new registry-based dispatch mechanism (\BinaryRegistry\, \BinaryUpdateRegistry\, \TernaryUpdateRegistry\) instead of the previous multimethod approach. This change introduces specialized traits for binary and ternary operations, enabling more efficient type-specific resolution and caching. Consequently, core operations for \DenseVector\, \DenseMatrix\, \Counter\, and \Counter2\ (such as addition, subtraction, scaling, and dot products) are now registered against these new registries, which may alter implicit resolution order and performance characteristics for users relying on these mathematical operations.
math/src/main/scala/breeze/linalg/operators · high confidence
Scala 3 compatibility layer for implicit conversions and literal rows
This change introduces Scala 3-specific compatibility support in the math library. It adds a \ConversionOrSubtype\ trait and associated given instances to align Scala 3's stricter implicit search behavior with the previous Scala 2 semantics, ensuring existing conversion logic continues to work as expected. Additionally, it provides a \LiteralRow\ support trait with implicit instances for arrays, dense vectors, sequences, and tuples up to size 11, enabling the construction of matrix literals from these data structures in Scala 3.
_math/src/main/scala\3 · high confidence
Test coverage
Added Gaussian Mixture Model benchmark; Added benchmark for CanTraverseValues matrix operations; Added benchmark for dense polynomial evaluation; Added benchmark for float softmax implementation; Added test coverage for core math components; New linalg performance benchmarks for dense and sparse vectors and matrices; Removal of IntCounter property-based tests.
Dependencies
Dependency updates and build restructuring
This change updates several core dependencies, including bumping dev.ludovic.netlib to version 3.0.1, JTransforms to 3.1, and Log4j to 2.17.1 (addressing [CVE redacted] and [CVE redacted]). It also upgrades Spire to 0.17.0 for Scala 2.12 and 0.18.0 for Scala 2.13+, and adds scala-collection-compat 2.7.0. The build structure is reorganized into distinct subprojects (math, natives, viz, macros, benchmark) with specific library dependencies defined for each, such as JFreeChart for visualization and Caliper for benchmarking.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 47 → 55 (+8.4)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 87 (-12.6)
- Architecture 69 → 100 (+31.0)
- Maturity 46 → 44 (-1.6)
- Readiness 30 → 50 (+20.0)
- Security 85 → 72 (-13.7)
Resolved (14)
- Dimension evaluation failed
- Duplicated block (55 lines × 2) (math/src/main/java/breeze/linalg/operators/DenseVectorSupportMethods.java)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No automated tests
- No exposed public API
- No tests found
- Test reliability not included
- The README links only Scaladoc (outdated) and a Google group for questions; there is no clear entry point for learning or getting help. (README.md)
- The README states Breeze is 'mostly retired' with no successor or active maintainer, leaving readers unsure what to do next. (README.md)
- The viz library README mentions planned features (LaTeX labels) but does not state whether it is actively maintained or has dropped support. (viz/README.md)
- early-stage repository — too little history to judge knowledge freshness
- single-commit history — no usable git history window to measure hotspots
- single-maintainer — knowledge-concentration (bus factor) risk
New (304)
- ArrayUtil.equals (cognitive 70) (math/src/main/codegen/breeze/util/ArrayUtil.scala)
- ArrayUtil.equals (cyclomatic 32) (math/src/main/codegen/breeze/util/ArrayUtil.scala)
- AssertImpl.assertLikeImpl (cognitive 18) (macros/src/main/scala_2/breeze/macros/AssertImpl.scala)
- BacktrackingLineSearch.iterations (cognitive 17) (math/src/main/scala/breeze/optimize/BacktrackingLineSearch.scala)
- Builder.result (cognitive 20) (math/src/main/scala/breeze/linalg/CSCMatrix.scala)
- CSCMatrix.equals (cognitive 50) (math/src/main/scala/breeze/linalg/CSCMatrix.scala)
- CSCMatrix.equals (cyclomatic 20) (math/src/main/scala/breeze/linalg/CSCMatrix.scala)
- CSCMatrix.update (cognitive 16) (math/src/main/scala/breeze/linalg/CSCMatrix.scala)
- CSCMatrixExpandedOps.cscScaleAdd (cognitive 19) (math/src/main/codegen/breeze/linalg/operators/CSCMatrixOps.scala)
- CSCMatrixExpandedOps.csc_csc_OpAdd (cognitive 27) (math/src/main/codegen/breeze/linalg/operators/CSCMatrixOps.scala)
- CSCMatrixExpandedOps.csc_csc_OpMulScalar (cognitive 27) (math/src/main/codegen/breeze/linalg/operators/CSCMatrixOps.scala)
- CSCMatrixExpandedOps.csc_csc_OpSub (cognitive 27) (math/src/main/codegen/breeze/linalg/operators/CSCMatrixOps.scala)
- CSCMatrixOps_Ring.CSCMatrixCanAdd_M_M_Semiring (cognitive 27) (math/src/main/codegen/breeze/linalg/operators/CSCMatrixOps.scala)
- CSCMatrixOps_Ring.CSCMatrixCanMulScalarM_M_Semiring (cognitive 27) (math/src/main/codegen/breeze/linalg/operators/CSCMatrixOps.scala)
- CSCMatrixOps_Ring.CSCMatrixCanSubM_M_Ring (cognitive 27) (math/src/main/codegen/breeze/linalg/operators/CSCMatrixOps.scala)
- CSCMatrixOps_Ring.cscScaleAdd (cognitive 19) (math/src/main/codegen/breeze/linalg/operators/CSCMatrixOps.scala)
- CSCMatrixOps_Ring.zipMapVals (cognitive 29) (math/src/main/codegen/breeze/linalg/operators/CSCMatrixOps.scala)
- CanConvolve.dvT1DConvolve (cognitive 22) (math/src/main/codegen/breeze/signal/support/CanConvolve.scala)
- CanConvolve.dvT1DConvolve (cyclomatic 25) (math/src/main/codegen/breeze/signal/support/CanConvolve.scala)
- CanFilterMedian.dvFilterMedianT (cognitive 39) (math/src/main/codegen/breeze/signal/support/CanFilterMedian.scala)
- …and 284 more
Architecture
- Containers 0 added · 0 removed · contexts 2 added · 0 removed · edges 1 added · 0 removed
Added bounded contexts (2)
- math
- viz
Added dependency edges (1)
- viz → math
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
scalanlp/breeze was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 27 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit fd73d09976a1a50d68b91a53e3896980502d335e — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-d00c643c3f66.