Conversation

AadishJ

Resolves #3791.

Description

What is the purpose of this pull request?

This pull request:

  • Adds a C implementation of the poisson mgf.
  • Includes benchmarks for the C implementation.
  • Provides examples demonstrating the usage of the poisson mgf in C.

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@stdlib-botstdlib-bot added StatisticsIssue or pull request related to statistical functionality.Needs ReviewA pull request which needs code review.labels Jan 7, 2025
@AadishJ

/stdlib update-copyright-years

@stdlib-botstdlib-bot added the bot: In ProgressPull request is currently awaiting automation.label Jan 7, 2025
@stdlib-botstdlib-bot removed the bot: In ProgressPull request is currently awaiting automation.label Jan 7, 2025
@stdlib-bot

Coverage Report

PackageStatementsBranchesFunctionsLines
stats/base/dists/poisson/mgf$\color{green}246/246$
$\color{green}+100.00\%$
$\color{green}15/15$
$\color{green}+100.00\%$
$\color{green}4/4$
$\color{green}+100.00\%$
$\color{green}246/246$
$\color{green}+100.00\%$

The above coverage report was generated for the changes in this PR.

@stdlib-botstdlib-bot added the Good First PRA pull request resolving a Good First Issue.label Jun 19, 2025
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>
@Planeshifter

/stdlib merge

@stdlib-botstdlib-bot added bot: In ProgressPull request is currently awaiting automation.and removed bot: In ProgressPull request is currently awaiting automation.labels Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@PlaneshifterPlaneshifter added the Ready To MergeA pull request which is ready to be merged.label Jun 19, 2025
@stdlib-botstdlib-bot removed the Needs ReviewA pull request which needs code review.label Jun 19, 2025
@stdlib-bot

PR Commit Message

feat: add C implementation for `stats/base/dists/poisson/mgf`

PR-URL: https://.com/stdlib-js/stdlib/pull/4626
Closes: https://.com/stdlib-js/stdlib/issues/3791

Co-authored-by: Aadish Jain <firestorm@AadishJain>
Co-authored-by: Philipp Burckhardt <[email protected]>
Co-authored-by: stdlib-bot <[email protected]>
Reviewed-by: Philipp Burckhardt <[email protected]>
Signed-off-by: Philipp Burckhardt <[email protected]>

Please review the above commit message and make any necessary adjustments.

@PlaneshifterPlaneshifter merged commit 2f3cca7 into stdlib-js:develop Jun 19, 2025
47 checks passed
t.end();
});

tape( 'if provided `+infinity` for `t` and a valid `lambda`, the function returns `+infinity`', opts, function test( t ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Planeshifter Why do these tests not match test.mgf.js? The tolerances have also been increased. I suggest revisiting this test file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligned the tolerances; but in this case, the native test file is actually more comprehensive (I had to do some clean-up before merge) and the main one incorrectly referred to x parameter instead of t.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey please let me know if I can help

Copy link
Member

@Planeshifter Planeshifter Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AadishJ Thanks for the offer! Will ping you on any other open PRs should I see any discrepancies that we should look into. In this case, I mainly took the tests from the test.native.js and updated the main test file accordingly, while then tweaking the names to avoid a reference to "range", since lambda should be referred to as the mean parameter.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
Good First PRA pull request resolving a Good First Issue.Ready To MergeA pull request which is ready to be merged.StatisticsIssue or pull request related to statistical functionality.
None yet

Successfully merging this pull request may close these issues.

[RFC]: Add C implementation for @stdlib/stats/base/dists/poisson/mgf