lundi 5 juin 2017

Random weighted selection then remove weight

I have no reputation for a comment on @PeterLawrey's answer:Random weighted selection in Java. It is good. But now I call next() get a result as A and want to remove weight for A from map to avoid to get A again. How can I deal with it?




Aucun commentaire:

Enregistrer un commentaire