|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Prime number utilities for hash tables and mathematical operations. More...
Go to the source code of this file.
Namespaces | |
| namespace | Primes |
Functions | |
| size_t | Primes::next_prime (unsigned long n) |
| Find the smallest prime number >= n from the database. | |
| bool | Primes::check_primes_database () |
| Verify the integrity of the prime database. | |
| bool | Primes::is_prime (unsigned long n) |
| Test if a number is prime using trial division. | |
| unsigned long | Primes::next_prime_number_greater_than (unsigned long n) |
| Find the next prime strictly greater than n. | |
Prime number utilities for hash tables and mathematical operations.
This file provides functions for working with prime numbers, primarily used for determining optimal hash table sizes. Prime-sized tables reduce clustering in hash collision resolution.
Definition in file primes.H.