Name

WeightedSelection - Weighted Randomized Selections

Synopsis

Implements a simple method for obtaining weighted randomized selections very quickly. The selection object is simple to create, consumes very little memory, and will return in the worst case in O(n) time, where n is the number of possibilities.

Description

See RDoc Documentation, available at weightedselect.rubyforge.org

Known Issues

None - Please contribute bugs on RubyForge: rubyforge.org/projects/weightedselect

Copyright

WeightedSelection - Weighted Randomized Selection Copyright 2006 Blaine Cook <[email protected]>.

WeightedSelection is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

WeightedSelection is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with WeightedSelection; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA