摘要 |
A method and apparatus for the selection of random values from a set of N non-sequential values includes software in ROM and RAM for information pool storage. Coupled to the ROM and RAM, a microprocessor sorts the values from smallest to largest, initializes local variables, processes a current value from a first value of the set, and compares the difference to a current information pool entry difference. A range increment is incremented if the difference equals the current information pool entry difference and a new information pool entry is created if the difference does not. The information pool is stored and random values are selected by generating a pseudo random number, constraining the pseudo random number between one and N, indexing into the information pool using the pseudo random number to create a pool entry index and generating the random value using a selected pool entry first value.
|