|
Project Euler Solutions
|
Classes | |
| struct | prime_counter |
| A cached prime number generator. More... | |
| struct | prime_factor_counter |
| struct | prime_sieve |
Typedefs | |
| typedef struct prime_sieve | prime_sieve |
| typedef struct prime_counter | prime_counter |
| typedef struct prime_factor_counter | prime_factor_counter |
Functions | |
| prime_sieve | prime_sieve0 () |
| void | free_prime_counter (prime_counter *pc) |
| prime_counter | prime_counter1 (uintmax_t stop) |
| prime_counter | prime_counter0 () |
| void | free_prime_factor_counter (prime_factor_counter *pfc) |
| uintmax_t | is_composite (uintmax_t n) |
| Tells you if a number is composite, and if so, its smallest prime factor. More... | |
| bool | is_prime (uintmax_t n) |
| Tells you if a number is prime. More... | |
Variables | |
| static uintmax_t * | prime_cache = NULL |
| static uintmax_t | prime_cache_max = 0 |
| static size_t | prime_cache_size = 0 |
| static size_t | prime_cache_idx = 0 |
| typedef struct prime_counter c::include::primes::prime_counter |
| typedef struct prime_factor_counter c::include::primes::prime_factor_counter |
| typedef struct prime_sieve c::include::primes::prime_sieve |
| void c::include::primes::free_prime_counter | ( | prime_counter * | pc | ) |
|
inline |

| uintmax_t is_composite | ( | uintmax_t | n | ) |
Tells you if a number is composite, and if so, its smallest prime factor.
| n | The number you wish to test |


|
inline |
Tells you if a number is prime.
| n | The number you wish to test |


|
inline |

|
inline |


| prime_sieve c::include::primes::prime_sieve0 | ( | ) |

|
static |
|
static |
|
static |
|
static |
1.8.11