The following module was proposed for inclusion in the Module List:
modid: Algorith::Numerical::Sample::Weighted
DSLIP: cdpOp
description: Weighted random sampling of set (perl array)
userid: BROWSERUK (NJS)
chapterid: 2 (Perl_Core_Modules)
communities:
PerlMonks.com
similar:
rationale:
An O(n) solution to picking elements from a set according to a set
probabilities or weights.
Makes no attempt to ensure 'fairness' in the way
Algorithm::Numerical::Sample does, only that elements are picked,
their distributions will approximate to the supplied
weights/probabilities over time.
Trades space for time, but does it in a manner that keeps the space
requirements to a minimum. It also allows efficient adjustment of
individual weights/probabilities on-the-fly without needing to
reconstruct/recalculateeverything. This is useful in systems where
the weighting changes as the system progresses.
enteredby: BROWSERUK (NJS)
enteredon: Wed Jan 29 10:38:25 2003 GMT
The resulting entry would be:
Algorith::Numerical::Sample::
::Weighted cdpOp Weighted random sampling of set (perl array) BROWSERUK
Thanks for registering,
The Pause Team
PS: The following links are only valid for module list maintainers:
Registration form with editing capabilities:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=a3200000_8e06e762b1a64afb&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=a3200000_8e06e762b1a64afb&SUBMIT_pause99_add_mod_insertit=1