-
-
Notifications
You must be signed in to change notification settings - Fork 997
feat: add C implementation for stats/base/dists/binomial/mgf
#4414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add C implementation for stats/base/dists/binomial/mgf
#4414
Conversation
PR-URL: stdlib-js#4110 Reviewed-by: Athan Reines <[email protected]> --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: passed - task: run_c_examples status: passed - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: passed - task: run_c_benchmarks status: passed - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: passed - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: passed ---
…nto develop
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
- task: run_javascript_examples
status: na
- task: run_c_examples
status: na
- task: run_cpp_examples
status: na
- task: run_javascript_readme_examples
status: na
- task: run_c_benchmarks
status: na
- task: run_cpp_benchmarks
status: na
- task: run_fortran_benchmarks
status: na
- task: run_javascript_benchmarks
status: na
- task: run_julia_benchmarks
status: na
- task: run_python_benchmarks
status: na
- task: run_r_benchmarks
status: na
- task: run_javascript_tests
status: na
---
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
---
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
- task: run_javascript_examples
status: na
- task: run_c_examples
status: na
- task: run_cpp_examples
status: na
- task: run_javascript_readme_examples
status: na
- task: run_c_benchmarks
status: na
- task: run_cpp_benchmarks
status: na
- task: run_fortran_benchmarks
status: na
- task: run_javascript_benchmarks
status: na
- task: run_julia_benchmarks
status: na
- task: run_python_benchmarks
status: na
- task: run_r_benchmarks
status: na
- task: run_javascript_tests
status: na
---
…nto develop
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
- task: run_javascript_examples
status: na
- task: run_c_examples
status: na
- task: run_cpp_examples
status: na
- task: run_javascript_readme_examples
status: na
- task: run_c_benchmarks
status: na
- task: run_cpp_benchmarks
status: na
- task: run_fortran_benchmarks
status: na
- task: run_javascript_benchmarks
status: na
- task: run_julia_benchmarks
status: na
- task: run_python_benchmarks
status: na
- task: run_r_benchmarks
status: na
- task: run_javascript_tests
status: na
---
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: passed
- task: lint_package_json
status: passed
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: passed
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: passed
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: passed
- task: lint_c_examples
status: passed
- task: lint_c_benchmarks
status: passed
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
- task: run_javascript_examples
status: na
- task: run_c_examples
status: na
- task: run_cpp_examples
status: na
- task: run_javascript_readme_examples
status: na
- task: run_c_benchmarks
status: na
- task: run_cpp_benchmarks
status: na
- task: run_fortran_benchmarks
status: na
- task: run_javascript_benchmarks
status: na
- task: run_julia_benchmarks
status: na
- task: run_python_benchmarks
status: na
- task: run_r_benchmarks
status: na
- task: run_javascript_tests
status: na
---
Coverage Report
The above coverage report was generated for the changes in this PR. |
|
/stdlib update-copyright-years |
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: na
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: na
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: na
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: passed
- task: lint_c_benchmarks
status: passed
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
- task: run_javascript_examples
status: na
- task: run_c_examples
status: passed
- task: run_cpp_examples
status: na
- task: run_javascript_readme_examples
status: na
- task: run_c_benchmarks
status: passed
- task: run_cpp_benchmarks
status: na
- task: run_fortran_benchmarks
status: na
- task: run_javascript_benchmarks
status: na
- task: run_julia_benchmarks
status: na
- task: run_python_benchmarks
status: na
- task: run_r_benchmarks
status: na
- task: run_javascript_tests
status: na
---
|
@Planeshifter @kgryte Do i have to |
Signed-off-by: JoyBoy <[email protected]>
---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
- task: lint_filenames
status: passed
- task: lint_editorconfig
status: passed
- task: lint_markdown
status: passed
- task: lint_package_json
status: na
- task: lint_repl_help
status: na
- task: lint_javascript_src
status: na
- task: lint_javascript_cli
status: na
- task: lint_javascript_examples
status: passed
- task: lint_javascript_tests
status: na
- task: lint_javascript_benchmarks
status: passed
- task: lint_python
status: na
- task: lint_r
status: na
- task: lint_c_src
status: na
- task: lint_c_examples
status: na
- task: lint_c_benchmarks
status: na
- task: lint_c_tests_fixtures
status: na
- task: lint_shell
status: na
- task: lint_typescript_declarations
status: na
- task: lint_typescript_tests
status: na
- task: lint_license_headers
status: passed
---
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
- task: run_javascript_examples
status: passed
- task: run_c_examples
status: na
- task: run_cpp_examples
status: na
- task: run_javascript_readme_examples
status: passed
- task: run_c_benchmarks
status: na
- task: run_cpp_benchmarks
status: na
- task: run_fortran_benchmarks
status: na
- task: run_javascript_benchmarks
status: passed
- task: run_julia_benchmarks
status: na
- task: run_python_benchmarks
status: na
- task: run_r_benchmarks
status: na
- task: run_javascript_tests
status: na
---
|
@0PrashantYadav0 It would be good to have |
|
@Planeshifter I opened a PR for that please review and merge after that i will add the implementation in this. Thank you. |
Signed-off-by: Philipp Burckhardt <[email protected]>
- Fix C function comment (CDF → MGF) - Fix parameter name in C documentation (x → t) - Add missing semicolon in TypeScript example
CRITICAL FIXES: - Fix C function signature: n parameter from double to int32_t - Fix C header declaration to match implementation - Fix NAPI macro from DDD_D to DID_D for correct type binding - Fix README C API documentation (parameter types and signatures) - Fix C examples and benchmarks to use int32_t for n parameter - Add missing stdint.h includes RATIONALE: - The number of trials (n) in binomial distribution must be integer - This matches other stdlib binomial implementations - Fixes parameter validation and type consistency - Prevents accepting invalid non-integer trial counts All C code now correctly uses int32_t for discrete count parameter.
...modules/@stdlib/stats/base/dists/binomial/mgf/include/stdlib/stats/base/dists/binomial/mgf.h
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/binomial/mgf/src/main.c
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/binomial/mgf/README.md
Outdated
Show resolved
Hide resolved
…/mgf`
---
type: pre_push_report
description: Results of running various checks prior to pushing changes.
report:
- task: run_javascript_examples
status: passed
- task: run_c_examples
status: passed
- task: run_cpp_examples
status: na
- task: run_javascript_readme_examples
status: failed
---
13180e5 to
b0bfb38
Compare
lib/node_modules/@stdlib/stats/base/dists/binomial/mgf/test/test.native.js
Show resolved
Hide resolved
Signed-off-by: Philipp Burckhardt <[email protected]>
lib/node_modules/@stdlib/stats/base/dists/binomial/mgf/manifest.json
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/binomial/mgf/manifest.json
Outdated
Show resolved
Hide resolved
lib/node_modules/@stdlib/stats/base/dists/binomial/mgf/manifest.json
Outdated
Show resolved
Hide resolved
Signed-off-by: Philipp Burckhardt <[email protected]>
lib/node_modules/@stdlib/stats/base/dists/binomial/mgf/lib/native.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Philipp Burckhardt <[email protected]>
Planeshifter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ready now.
PR Commit MessagePlease review the above commit message and make any necessary adjustments. |
Resolves #3471
Description
This pull request:
Related Issues
This pull request:
@stdlib/stats/base/dists/binomial/mgf#3471Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers