Skip to content

RandLib 2.0.0-alpha.1

Choose a tag to compare

@github-actions github-actions released this 17 Oct 09:34
· 64 commits to master since this release

Architecture

  • Converted RandLib to a header-only C++20 library under include/randlib/ and moved the public API
    into namespace randlib.
  • Made every sampler accept any standard uniform random bit generator. Added PCG64, Xoshiro256++,
    SplitMix64 and deterministic stream construction while retaining the corrected legacy engines.
  • Removed hidden mutable sampling state. Bulk sampling uses std::span, support categories are a
    scoped enum, parameter factories are named, and distribution classes expose const-correct,
    [[nodiscard]] APIs.

Build and tooling

  • Added a pinned Clang 18 formatting policy and pre-commit hook, and applied it to the public headers
    and test sources without reordering dependency-sensitive includes.
  • Clang-tidy now analyzes the explicit-instantiation translation unit and public headers as a blocking
    CI job, with every diagnostic promoted to an error.
  • Added opt-in Google Benchmark sampling comparisons for normal, exponential, gamma and Poisson
    distributions against the standard library, plus stable-law sampling.
  • Engine-adapter interoperability tests now verify identical engine advancement and allow up to
    eight ULPs of platform-dependent variation between direct and type-erased sampling paths.
  • Negative-binomial maximum-likelihood fitting now optimizes its positive shape parameter in log
    space. Newton iterations reject non-finite states after bounded backtracking instead of stalling
    on a platform-dependent special-function pole (B39).

API cleanup

  • Kept the type-erased EngineRef sampling adapters private and removed the access-specifier churn
    left by the automated header conversion.
  • Moved implementation-only numerical helpers and tolerances into randlib::math::detail.
    The public Pair and Triplet aliases now live with the other core declarations, while the
    unconstrained arithmetic overloads for their underlying std::pair types have been removed.

Numerical kernel

  • Templated the elementary, gamma, beta, Bessel, zeta, Lambert W and Marcum functions on their
    floating-point type. Existing mixed integer/double calls remain source-compatible, while
    long double now stays in a separate typed path covered by closed-form and recurrence tests.
  • Templated factorial and combinatorial return types; calls without an explicit type retain their
    previous long double result.