|
|
|
|
|
Bit-sieveA bit-sieve is a function used in the Java programming language. A bit sieve used for finding prime number candidates. Allows setting and clearing of bits in a storage array. The size of the sieve is assumed to be constant to reduce overhead. All the bits of a new bit-sieve are zero, and bits are removed from it by setting them. To reduce storage space and increase efficiency, no even numbers are represented in the sieve (each bit in the sieve represents an odd number). The relationship between the index of a bit and the number it represents is given by - N = offset + (2index + 1),
where N is the integer represented by a bit in the sieve, offset is some even integer indicating where the sieve begins, and index is the index of a bit in the sieve array.
|
 |
|
| Copyright 2005-2009 OnPedia.com. All Rights Reserved |
|
|