Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Dec 18, 2024
1 parent ba987ef commit 6454986
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ indent_style = tab
[*.{md,md.txt}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false
trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim.
# Set properties for `usage.txt` files:
[usage.txt]
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<section class="release" id="unreleased">

## Unreleased (2024-12-17)
## Unreleased (2024-12-18)

<section class="features">

Expand Down Expand Up @@ -34,6 +34,7 @@ This release closes the following issue:

<details>

- [`8bf8285`](https://github.com/stdlib-js/stdlib/commit/8bf8285aba0ecbd00ae145c4c5c098cd28135814) - **chore:** minor clean-up _(by Philipp Burckhardt)_
- [`3550fc4`](https://github.com/stdlib-js/stdlib/commit/3550fc4a653ce3d56e01a36752dd5e9f47db3586) - **feat:** add C implementation for `@stdlib/stats-base/dists/poisson/mean` [(#3973)](https://github.com/stdlib-js/stdlib/pull/3973) _(by Divyansh Seth, Philipp Burckhardt)_

</details>
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Dan Rose <[email protected]>
Daniel Killenberger <[email protected]>
Daniel Yu <[email protected]>
Debashis Maharana <[email protected]>
Divyansh Seth <[email protected]>
Dominic Lim <[email protected]>
Dominik Moritz <[email protected]>
Dorrin Sotoudeh <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion examples/c/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ int main( void ) {
for ( i = 0; i < 10; i++ ) {
lambda = 20.0 * (double)rand() / ( (double)RAND_MAX + 1.0 );
v = stdlib_base_dists_poisson_mean( lambda );
printf( "λ: %lf , E(X;λ): %lf\n", lambda , v );
printf( "λ: %lf, E(X;λ): %lf\n", lambda, v );
}
}
1 change: 1 addition & 0 deletions include/stdlib/stats/base/dists/poisson/mean.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifdef __cplusplus
extern "C" {
#endif

/**
* Returns the mean of a Poisson distribution with mean parameter `lambda`.
*/
Expand Down
1 change: 1 addition & 0 deletions lib/native.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var addon = require( './../src/addon.node' );
/**
* Returns the expected value of a Poisson distribution.
*
* @private
* @param {NonNegativeNumber} lambda - mean parameter
* @returns {NonNegativeNumber} expected value
*
Expand Down
18 changes: 3 additions & 15 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,12 @@
/**
* Returns the expected value of a Poisson distribution.
*
* @param {NonNegativeNumber} lambda - mean parameter
* @returns {NonNegativeNumber} expected value
* @param lambda mean parameter
* @return expected value
*
* @example
* var v = mean( 9.0 );
* double v = mean( 9.0 );
* // returns 9.0
*
* @example
* var v = mean( 1.0 );
* // returns 1.0
*
* @example
* var v = mean( -0.2 );
* // returns NaN
*
* @example
* var v = mean( NaN );
* // returns NaN
*/
double stdlib_base_dists_poisson_mean( const double lambda ) {
if (
Expand Down

0 comments on commit 6454986

Please sign in to comment.