SSP_Resampler: SSP resampling

View source: R/RcppExports.R

SSP_ResamplerR Documentation

SSP resampling

Description

This function implements the SSP resampling algorithm \insertCitegerber2019negativePFoptim.

Usage

SSP_Resampler(U,W)

Arguments

W

A vector of normalized weights.

U

A vector of points in (0,1) such that length(U)=length(W).

Details

For efficiency reasons, SSP_Resampler does not perform checks on the supplied arguments.

Value

A vector of length N with elements in the set \{1,...,N\}, with N=length(U)=length(W).

References

\insertAllCited

Examples

N<-100
W<-rbeta(N,0.5,2)
W<-W/sum(W)
J<-SSP_Resampler(runif(N),W)

mathieugerber/PFoptim documentation built on July 1, 2022, 2:34 p.m.