| Crates.io | logprob |
| lib.rs | logprob |
| version | 0.2.1 |
| created_at | 2024-01-17 17:07:34.786252+00 |
| updated_at | 2025-04-04 09:13:13.777035+00 |
| description | A wrapper around floats to handle log probabilities |
| homepage | |
| repository | https://github.com/michaelgoodale/logprob/ |
| max_upload_size | |
| id | 1103265 |
| size | 47,062 |
This crate defines a basic LogProb wrapper for floats. The struct is designed so
that only values that are coherent for a log-probability are acceptable. This means that
LogProb can store:
The crate is intended for careful implementations of computations involving log-probabilities.
LogProbs (equivalent take the product of their corresponding raw probabilities)LogProb and an unsigned integer (e.g. equivalent to p^n).Ord and Eq trait on LogProb as there is no NaN.For examples, see the documentation.