2013/3/17 Ted Dunning <ted.dunn...@gmail.com> > Finally, the names should not consist of combinations of "pick" and > "remit". The correct English terms are "sample" and "replacement". >
I suspected that the name was not good, it is because my English is poor also, it was perhaps unnecessary to consider two methods 'pick ()' and ' pickAndRemit ()' becaufe 'pick' is nothing more than a combination of ' pickAndRemit ()' and 'remove ()' at source code, but I thought to the real bag more than the java object's bag ', that's why I thought that bag must have java in this method, I also saw that this need exists and when you google 'java bag' you will find many java bags that have a method to get random element, maby the commons-collections bag does not have the same objective I did not understand very well the rest of your post but I think the bag is being best suited to sampling because it's powerful, you do not need to loop over all elements, but only on the unique set if you have an ensemble that contain 1000 x and 2000 y sampling using an array or iterator will be ( for i from 0 to 2999) and with bag (for i from 0 to 1)