prodef

Crates.ioprodef
lib.rsprodef
version0.1.0
created_at2026-01-16 23:59:35.279508+00
updated_at2026-01-16 23:59:35.279508+00
descriptionA simple Rust crate for handling probability distributions.
homepagehttps://github.com/ajefweiss/prodef-rs/
repositoryhttps://github.com/ajefweiss/prodef-rs/
max_upload_size
id2049554
size107,801
Andreas J. Weiss (ajefweiss)

documentation

README

ProDeF - Probability Density Functions

A simple Rust crate for handling probability distributions.

Core Traits

All probability density functions (PDFs) implement the [Density], providing common operations like:

  • Evaluation: Compute probability density (non-normalized) at a given point
  • Sampling: Generate random samples from the distribution
  • Domain queries: Checking valid input ranges

The Domain trait represents the valid input space for a PDF. A domain may be bounded, unbounded, or have a special structure.

Available domain types:

  • MDomain - Bounded multivariate domains (hypercubes)
  • UDomain - Unbounded multivariate domains
  • SDomain - Special univariate domains (for the use of uni dimensional PDFs)

Distribution Types

Multivariate Distributions

  • MultivariateDensity Combines multiple independent univariate distributions into a multivariate density. Use when dimensions are statistically independent.

  • MultiNormalDensity A full multivariate normal (Gaussian) distribution with arbitrary covariance. Use when modeling correlated multi-dimensional data.

  • ParticleDensity A non-parametric density represented by weighted particles/samples. Use for complex distributions that can't be expressed analytically or for particle filter applications.

Univariate Distributions

For one-dimensional cases, use these directly:

Commit count: 5

cargo fmt