package urn

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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.

module type WeightType = sig ... end

Input signature of the functor Make.

module type U = sig ... end

Output signature of the functor Make.

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

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

module IntWeight : WeightType with type t = int

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

module FloatWeight : WeightType with type t = float

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

OCaml

Innovation. Community. Security.