diff --git a/.editorconfig b/.editorconfig index 60d743f..0779e8a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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] diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index a94fb1c..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-12-01T05:10:07.697Z diff --git a/CHANGELOG.md b/CHANGELOG.md index a344f19..d01b998 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,63 @@ > Package changelog. +
+ +## Unreleased (2024-12-17) + +
+ +### Features + +- [`c0d9c76`](https://github.com/stdlib-js/stdlib/commit/c0d9c760c9657e28d6b1d3daf5013708a928ae6c) - add C implementation `stats/base/dists/rayleigh/pdf` [(#3945)](https://github.com/stdlib-js/stdlib/pull/3945) + +
+ + + +
+ +### Closed Issues + +This release closes the following issue: + +[#3807](https://github.com/stdlib-js/stdlib/issues/3807) + +
+ + + +
+ +### Commits + +
+ +- [`c0d9c76`](https://github.com/stdlib-js/stdlib/commit/c0d9c760c9657e28d6b1d3daf5013708a928ae6c) - **feat:** add C implementation `stats/base/dists/rayleigh/pdf` [(#3945)](https://github.com/stdlib-js/stdlib/pull/3945) _(by Vinit Pandit, Philipp Burckhardt)_ + +
+ +
+ + + +
+ +### Contributors + +A total of 2 people contributed to this release. Thank you to the following contributors: + +- Philipp Burckhardt +- Vinit Pandit + +
+ + + +
+ + +
## 0.2.2 (2024-07-28) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a8d0bb6..6c27214 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2,11 +2,14 @@ # # Contributors listed in alphabetical order. +Aadish Jain Aayush Khanna Abhijit Raut Adarsh Palaskar Aditya Sapra -AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com> +Ahmed Atwa +Ahmed Kashkoush +Ahmed Khaled Aleksandr <112382387+alextes90@users.noreply.github.com> Ali Salesi Aman Bhansali @@ -23,6 +26,7 @@ Dan Rose Daniel Killenberger Daniel Yu <40680511+Daniel777y@users.noreply.github.com> Debashis Maharana +Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com> Dominic Lim <46486515+domlimm@users.noreply.github.com> Dominik Moritz Dorrin Sotoudeh @@ -45,12 +49,12 @@ Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com> Joris Labie Justin Dennison Karthik Prakash <116057817+skoriop@users.noreply.github.com> -Khaldon Kohantika Nath <145763549+kohantikanath@users.noreply.github.com> Krishnendu Das <86651039+itskdhere@users.noreply.github.com> Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com> -Lovelin <100030865+lovelindhoni@users.noreply.github.com> +Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com> Manik Sharma +Manvith M <148960168+manvith2003@users.noreply.github.com> Marcus Fantham Matt Cochrane Mihir Pandit <129577900+MSP20086@users.noreply.github.com> @@ -59,37 +63,40 @@ Mohammad Kaif Momtchil Momtchev Muhammad Haris Naresh Jagadeesan +Naveen Kumar Neeraj Pathak -NightKnight +Nishant Shinde <97207366+nishant-s7@users.noreply.github.com> Nithin Katta <88046362+nithinkatta@users.noreply.github.com> Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com> Ognjen Jevremović Oneday12323 <107678750+Oneday12323@users.noreply.github.com> +Ori Miles <97595296+orimiles5@users.noreply.github.com> Philipp Burckhardt Prajwal Kulkarni Pranav Goswami -Praneki <97080887+PraneGIT@users.noreply.github.com> -Pratik <97464067+Pratik772846@users.noreply.github.com> +Pranjal Jha <97080887+PraneGIT@users.noreply.github.com> +Pratik Singh <97464067+Pratik772846@users.noreply.github.com> Pratyush Kumar Chouhan -Priyansh <88396544+itsspriyansh@users.noreply.github.com> +Priyansh Prajapati <88396544+itsspriyansh@users.noreply.github.com> +Priyanshu Agarwal <113460573+AgPriyanshu18@users.noreply.github.com> Pushpendra Chandravanshi -RISHAV <115060907+rishav2404@users.noreply.github.com> Raunak Kumar Gupta Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> Ricky Reusser Ridam Garg <67867319+RidamGarg@users.noreply.github.com> +Rishav <115060907+rishav2404@users.noreply.github.com> Robert Gislason Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com> -Rutam <138517416+performant23@users.noreply.github.com> +Rutam Kathale <138517416+performant23@users.noreply.github.com> Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com> Ryan Seal Rylan Yang <137365285+rylany27@users.noreply.github.com> Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com> -SarthakPaandey <145528240+SarthakPaandey@users.noreply.github.com> +Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com> Saurabh Singh Seyyed Parsa Neshaei Shashank Shekhar Singh -Shivam <11shivam00@gmail.com> +Shivam Ahir <11shivam00@gmail.com> Shraddheya Shendre Shubh Mehta <93862397+Shubh942@users.noreply.github.com> Shubham Mishra @@ -98,7 +105,7 @@ Snehil Shah Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com> Spandan Barve Stephannie Jiménez Gacha -Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com> +Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com> Tirtadwipa Manunggal Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com> Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com> @@ -108,12 +115,10 @@ UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com> Vaibhav Patel <98279986+noobCoderVP@users.noreply.github.com> Varad Gupta Vinit Pandit <106718914+MeastroZI@users.noreply.github.com> +Vivek maurya <155618190+vivekmaurya001@users.noreply.github.com> Xiaochuan Ye +Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com> Yernar Yergaziyev -naveen -nishant-s7 <97207366+nishant-s7@users.noreply.github.com> olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com> -orimiles5 <97595296+orimiles5@users.noreply.github.com> rainn <88160429+AmCodesLame@users.noreply.github.com> rei2hu -yaswanth <116426380+yaswanthkosuru@users.noreply.github.com> diff --git a/README.md b/README.md index dfba667..6abe5b1 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,101 @@ for ( i = 0; i < 10; i++ ) { + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/rayleigh/pdf.h" +``` + +#### stdlib_base_dists_rayleigh_pdf( x, sigma ) + +Evaluates the probability density function (PDF) for a Rayleigh distribution. + +```c +double out = stdlib_base_dists_rayleigh_pdf( 0.3, 1.0 ); +// returns ~0.287 +``` + +The function accepts the following arguments: + +- **x**: `[in] double` input value. +- **sigma**: `[in] double` scale parameter. + +```c +double stdlib_base_dists_rayleigh_pdf( const double x, const double sigma ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/rayleigh/pdf.h" +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +int main( void ) { + double sigma; + double x; + double y; + int i; + + for ( i = 0; i < 25; i++ ) { + x = random_uniform( 0.0, 10.0 ); + sigma = random_uniform( 0.0, 10.0 ); + y = stdlib_base_dists_rayleigh_pdf( x, sigma ); + printf( "x: %lf, σ: %lf, f(x;σ): %lf\n", x, sigma, y ); + } +} +``` + +
+ + + +
+ + +