Repository navigation
RandLib 2.0.0-alpha.1
·
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 namespacerandlib. - 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
EngineRefsampling 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 publicPairandTripletaliases now live with the other core declarations, while the
unconstrained arithmetic overloads for their underlyingstd::pairtypes 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/doublecalls remain source-compatible, while
long doublenow 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
previouslong doubleresult.