feat: add C implementation for @stdlib/stats/base/dists/chi/kurtosis#10837
feat: add C implementation for @stdlib/stats/base/dists/chi/kurtosis#10837rautelaKamal wants to merge 9 commits intostdlib-js:developfrom
@stdlib/stats/base/dists/chi/kurtosis#10837Conversation
- Add C source file (src/main.c) implementing excess kurtosis formula - Add N-API addon wrapper (src/addon.c) - Add C header file (include/stdlib/stats/base/dists/chi/kurtosis.h) - Add build files (binding.gyp, include.gypi, src/Makefile) - Add manifest.json with required C dependencies - Update lib/index.js to load native addon with JS fallback - Add lib/native.js for native addon loading - Add test/test.native.js for native addon tests - Add test/test.main.js for JS fallback path coverage (100% coverage) - Add benchmark/benchmark.native.js and benchmark/c/ - Add examples/c/ Closes stdlib-js#3491
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
This was already implemented (the issue just wasn't closed). Notice that the changes you made here are also not applicable for base stats packages, where we do not use the tryRequire/polyfill pattern. |
Description
This pull request adds a native C implementation for
@stdlib/stats/base/dists/chi/kurtosis, resolving issue #3491.The excess kurtosis of a chi distribution with degrees of freedom
kis:where
mu = mean(k),sigma2 = variance(k),sigma = sqrt(sigma2), andg1 = skewness(k).Changes
src/main.cimplementing the kurtosis formula in Csrc/addon.cN-API wrapper usingSTDLIB_MATH_BASE_NAPI_MODULE_D_Dinclude/stdlib/stats/base/dists/chi/kurtosis.hheaderbinding.gyp,include.gypi,src/Makefile)manifest.jsonwith required C library dependencies (mean, variance, skewness, sqrt, is-nan)lib/index.jsto load native addon with pure-JS fallbacklib/native.jsnative addon loadertest/test.native.jsfor native addon testingtest/test.main.jsfor JS fallback coverage (100% coverage)Related Issues
Ref: #3491
Checklist