A C++ header-only library of statistical distribution functions with compile-time computing capabilities.
StatsLib is a C++ header-only library of statistical distribution functions, providing probability density functions, cumulative distribution functions, quantile functions, and random sampling methods. It solves the need for a lightweight, dependency-free statistical computing library in C++ with both run-time and compile-time evaluation capabilities.
C++ developers and researchers working on statistical modeling, simulations, or numerical applications who require efficient, embeddable statistical functions.
Developers choose StatsLib for its unique compile-time computation features, seamless integration with linear algebra libraries, and permissive Apache 2.0 license, offering a flexible alternative to heavier statistical suites.
A C++ header-only library of statistical distribution functions.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Easy integration into C++ projects without linking; simply include 'stats.hpp' as per the README.
Functions are constexpr, enabling evaluation during compilation for performance, demonstrated with assembly output in examples.
Familiar naming (e.g., dnorm, pnorm) reduces learning curve, making it accessible for users coming from R.
Optional wrappers for Armadillo, Blaze, Eigen, and STL vectors allow matrix-based operations, as shown in code snippets.
Matrix operations can be parallelized with OpenMP, enhancing performance for large datasets when enabled via compiler flags.
Focuses only on distribution functions, lacking broader tools like hypothesis testing or regression, which the README does not address.
Requires preprocessor defines (e.g., STATS_ENABLE_ARMA_WRAPPERS) for features, adding complexity and potential for errors in setup.
Compile-time features depend on the external GCEM library, though header-only, it introduces an additional dependency.