Skip to content

Conversation

AadishJ
Copy link
Contributor

@AadishJ AadishJ commented Jan 7, 2025

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-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. labels Jan 7, 2025
@AadishJ
Copy link
Contributor Author

AadishJ commented Jan 7, 2025

/stdlib update-copyright-years

@stdlib-bot stdlib-bot added the bot: In Progress Pull request is currently awaiting automation. label Jan 7, 2025
@stdlib-bot stdlib-bot removed the bot: In Progress Pull request is currently awaiting automation. label Jan 7, 2025
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Jan 7, 2025

Coverage Report

Package Statements Branches Functions Lines
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-bot stdlib-bot added the Good First PR A 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
Copy link
Member

/stdlib merge

@stdlib-bot stdlib-bot added bot: In Progress Pull request is currently awaiting automation. and removed bot: In Progress Pull request is currently awaiting automation. labels Jun 19, 2025
Copy link
Member

@Planeshifter Planeshifter left a comment

Choose a reason for hiding this comment

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

LGTM!

@Planeshifter Planeshifter added the Ready To Merge A pull request which is ready to be merged. label Jun 19, 2025
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Jun 19, 2025
@stdlib-bot
Copy link
Contributor

PR Commit Message

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

PR-URL: https://github.com/stdlib-js/stdlib/pull/4626
Closes: https://github.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.

@Planeshifter Planeshifter 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 GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Ready To Merge A pull request which is ready to be merged. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants