package prbnmcn-dagger

  1. Overview
  2. Docs

The Make functor is generic over a field F and a uniform sampler. Genericity over the underlying field is especially useful for testing, using arbitrary-precision rationals.

Parameters

module F : Intf.Field
module P : Particle with type field = F.t
module Sampler : sig ... end

Signature

type field = F.t

The type of weights.

type particle = P.t

The type of particles.

val stratified_resampling : target:int -> particle array -> int array t

stratified_resampling ~target particles computes an array of resampling counts, corresponding to a fresh population. target is the number of particles to resample and particles stores the input population.

  • raises Invalid_arg

    if target < 2

val stratified_resampling_list : target:int -> (particle -> int -> 'a -> 'a) -> particle list -> 'a -> 'a t

stratified_resampling_list ~target cons pop acc does as stratified_resampling but proceeds on a list of particles instead of an array. The given cons and function is given for each particle the number of copies to be done (which can be 0).

  • raises Invalid_arg

    if target < 2

val systematic_resampling : target:int -> particle array -> int array t

systematic_resampling ~target particles computes an array of resampling counts, corresponding to a fresh population. target is the number of particles to resample and particles stores the input population.

  • raises Invalid_arg

    if target < 2

val systematic_resampling_list : target:int -> (particle -> int -> 'a -> 'a) -> particle list -> 'a -> 'a t

systematic_resampling_list ~target cons pop acc does as systematic_resampling but proceeds on a list of particles instead of an array. The given cons and function is given for each particle the number of copies to be done (which can be 0).

  • raises Invalid_arg

    if target < 2

OCaml

Innovation. Community. Security.