package urn

  1. Overview
  2. Docs
Urn data structure for fast pure functional random sampling

Install

Dune Dependency

Authors

Maintainers

Sources

20231124.tar.gz
md5=51102864138dbf2859a15c680a18e566
sha512=64d80d5a772d930c20bf6e2eae4127c858e59cb192dba36b9022a64746bda594631f7c631a2fcdd53c077ed930f92990791783d4d60128a5ccf2be110444fa83

doc/urn/Urn/index.html

Module UrnSource

Urns for weighted random sampling.

This module implements the urn data structure given a weight type that is a totally ordered group with a random sampling function.

Sourcemodule type WeightType = sig ... end

Input signature of the functor Make.

Sourcemodule type U = sig ... end

Output signature of the functor Make.

Sourcemodule Make (Weight : WeightType) : U with type weight = Weight.t

Functor building an implementation of the urn structure given a weight type.

Sourcemodule IntWeight : WeightType with type t = int

A module for int weights using Random.int to sample random integers.

Sourcemodule FloatWeight : WeightType with type t = float

A module for float weights using Random.float to sample random floating point numbers.

OCaml

Innovation. Community. Security.