Skip to content

feat: add C implementation for @stdlib/stats/base/dists/erlang/logpdf#10719

Open
rautelaKamal wants to merge 7 commits intostdlib-js:developfrom
rautelaKamal:feat/stats/base/dists/erlang/logpdf-c-port
Open

feat: add C implementation for @stdlib/stats/base/dists/erlang/logpdf#10719
rautelaKamal wants to merge 7 commits intostdlib-js:developfrom
rautelaKamal:feat/stats/base/dists/erlang/logpdf-c-port

Conversation

@rautelaKamal
Copy link
Contributor

@rautelaKamal rautelaKamal commented Mar 5, 2026

This PR adds a C implementation for @stdlib/stats/base/dists/erlang/logpdf.

Closes #3571

Changes

  • Added src/addon.c: Node.js native addon entry point

    • Added src/main.c: C implementation delegating to stdlib_base_dists_gamma_logpdf
    • Added include/stdlib/stats/base/dists/erlang/logpdf.h: C header file
    • Added lib/native.js: JavaScript wrapper for native addon
    • Added benchmark/benchmark.native.js: Native benchmark
    • Added manifest.json: Build manifest
    • Updated package.json: Added gypfile, include, and src directories
  • Read, understood, and followed the contributing guidelines

Add new addon.c file for Erlang logpdf distribution.

Signed-off-by: Kamal Singh Rautela <130351010+rautelaKamal@users.noreply.github.com>
Implement the logPDF function for Erlang distribution.

Signed-off-by: Kamal Singh Rautela <130351010+rautelaKamal@users.noreply.github.com>
Add header file for Erlang log probability density function.

Signed-off-by: Kamal Singh Rautela <130351010+rautelaKamal@users.noreply.github.com>
Add implementation of logpdf for Erlang distribution

Signed-off-by: Kamal Singh Rautela <130351010+rautelaKamal@users.noreply.github.com>
Signed-off-by: Kamal Singh Rautela <130351010+rautelaKamal@users.noreply.github.com>
Signed-off-by: Kamal Singh Rautela <130351010+rautelaKamal@users.noreply.github.com>
Added gypfile and updated directories to include src.

Signed-off-by: Kamal Singh Rautela <130351010+rautelaKamal@users.noreply.github.com>
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Mar 5, 2026
@stdlib-bot
Copy link
Contributor

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:

  1. Please read our contributing guidelines.

  2. Update your pull request description to include this checked box:

    - [x] Read, understood, and followed the [contributing guidelines](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md)

This acknowledgment confirms that you've read the guidelines, which include:

  • The developer's certificate of origin
  • Your agreement to license your contributions under the project's terms

We can't review or accept contributions without this acknowledgment.

Thank you for your understanding and cooperation. We look forward to reviewing your contribution!

@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Mar 5, 2026
@stdlib-bot
Copy link
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/erlang/logpdf $\color{green}198/198$
$\color{green}+100.00%$
$\color{green}9/9$
$\color{green}+100.00%$
$\color{green}2/2$
$\color{green}+100.00%$
$\color{green}198/198$
$\color{green}+100.00%$

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

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. Needs Review A pull request which needs code review. 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/erlang/logpdf

2 participants