-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[RFC]: Add C implementation for @stdlib/stats/base/dists/laplace/entropy #3709
Copy link
Copy link
Closed
Labels
AcceptedRFC feature request which has been accepted.RFC feature request which has been accepted.CIssue involves or relates to C.Issue involves or relates to C.FeatureIssue or pull request for adding a new feature.Issue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!A good first issue for new contributors!RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.StatisticsIssue or pull request related to statistical functionality.Issue or pull request related to statistical functionality.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: NormalNormal priority concern or feature request.Normal priority concern or feature request.
Metadata
Metadata
Assignees
Labels
AcceptedRFC feature request which has been accepted.RFC feature request which has been accepted.CIssue involves or relates to C.Issue involves or relates to C.FeatureIssue or pull request for adding a new feature.Issue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!A good first issue for new contributors!RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.StatisticsIssue or pull request related to statistical functionality.Issue or pull request related to statistical functionality.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: NormalNormal priority concern or feature request.Normal priority concern or feature request.
Description
This RFC proposes adding a C implementation, including a Node.js native addon, C benchmarks, and C examples, for the
@stdlib/stats/base/dists/laplace/entropypackage.When adding support, the following tasks should be completed:
srcfolder within the package's directory.libfolder to allow benchmarking and unit testing the native implementation from JavaScript.makecommands (as documented below).To provide a concrete example of what a PR adding the desired method should contain, see #3354, which is a PR adding a C implementation for the CDF of an arcsine distribution. This should provide an idea of what is expected.
Prerequisites
lib/main.jsand its required modules to identify allstdlibfunctions used.Related Issues
#3355
Questions
No.
Other
Once the implementation is ready including C examples and benchmarks, we should be able to run the following
makecommands.Build native add-on
NODE_ADDONS_PATTERN="@stdlib/stats/base/dists/laplace/entropy" make install-node-addonsRun C examples
make examples-c-files FILES="$(pwd)/lib/node_modules/@stdlib/stats/base/dists/laplace/entropy/examples/c/example.c"Run C benchmarks
make benchmark-c-files FILES="$(pwd)/lib/node_modules/@stdlib/stats/base/dists/laplace/entropy/benchmark/c/benchmark.c"Run JavaScript benchmarks
make benchmark-javascript-files FILES="$(pwd)/lib/node_modules/@stdlib/stats/base/dists/laplace/entropy/benchmark/benchmark.native.js"Run all tests
Notes
Checklist
RFC:.