Skip to content

Commit

Permalink
document static library, survival function and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
PauloCampana committed Jul 6, 2024
1 parent af7e679 commit 02b7701
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
![](image.png)

For over 30 probability distributions, this library provides:

* Random variable generation
* Density, Probability and Quantile functions
* Density, Probability, Survival and Quantile functions

Mathematical functions are tested for high precision and
RNG tested to correctly fit the distribution

# Installation
Builds static library with header file, optionally run tests
```bash
$ zig build -Doptimize=ReleaseFast
$ zig build test
$ zig build correctness -Doptimize=ReleaseFast
```

# Documentation
Avaliable on <https://paulocampana.github.io/random_variable>
# [Documentation](https://paulocampana.github.io/random_variable)

# Importing library
# Importing Zig module
```bash
$ zig fetch --save git+https://github.com/PauloCampana/random_variable
```
Expand All @@ -27,5 +36,3 @@ exe.root_module.addImport("random_variable", rv.module("random_variable"));
// main.zig
const rv = @import("random_variable");
```

Or just copy the whole project into yours and import `src/root.zig`
3 changes: 2 additions & 1 deletion src/random_variable.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Density/mass, probability and quantile functions for probability distributions.
//! Density, probability, survival and quantile functions
//! for probability distributions.
//!
//! Asserts invalid distribution parameters on Debug and ReleaseSafe modes
//! such as ±NaN, ±Inf, probabilities outside of the [0,1] interval or
Expand Down
4 changes: 2 additions & 2 deletions src/root.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Density/mass, probability, quantile and random number generation
//! functions for probability distributions.
//! Density, probability, survival and quantile functions +
//! random number generation for probability distributions.
//!
//! Asserts invalid distribution parameters on Debug and ReleaseSafe modes
//! such as ±NaN, ±Inf, probabilities outside of the [0,1] interval or
Expand Down

0 comments on commit 02b7701

Please sign in to comment.