This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author NeilGirdhar
Recipients NeilGirdhar, aisaac, eli.bendersky, madison.may, mark.dickinson, pitrou, rhettinger, serhiy.storchaka, tim.peters, westley.martinez
Date 2013-09-12.02:57:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378954666.54.0.586644776617.issue18844@psf.upfronthosting.co.za>
In-reply-to
Content
Should this really be implemented using the cumulative distribution and binary search algorithm?  Vose's Alias Method has the same initialization and memory usage cost (O(n)), but is constant time to generate each sample.

An excellent tutorial is here: http://www.keithschwarz.com/darts-dice-coins/
History
Date User Action Args
2013-09-12 02:57:46NeilGirdharsetrecipients: + NeilGirdhar, tim.peters, rhettinger, mark.dickinson, pitrou, eli.bendersky, aisaac, westley.martinez, serhiy.storchaka, madison.may
2013-09-12 02:57:46NeilGirdharsetmessageid: <1378954666.54.0.586644776617.issue18844@psf.upfronthosting.co.za>
2013-09-12 02:57:46NeilGirdharlinkissue18844 messages
2013-09-12 02:57:46NeilGirdharcreate