Template Class primes_interface

Class Documentation

template<class PRIMES_IMPLEMENTATION>
class primes_interface

the interface that all conforming implementations should conform to via CRTP.

Public Types

using value_type = prime_type

Primes’ data type for primes, defined as madlib::prime_type .

using reference = prime_type&

Primes’ reference data type for primes, defined as madlib::prime_type .

using const_reference = const prime_type&

Primes’ constant reference data type for primes, defined as madlib::prime_type .

using size_type = size_t

Primes’ type used to convey the maximum index that can be referred to.

Protected Functions

inline primes_interface &_interface_calculate_primes_through(const unsigned_integral auto &through_value)

Support calculate_primes_through() by implementing calculate_primes_through_impl().

inline bool _interface_is_prime(const unsigned_integral auto &number)

Support is_prime() by implementing is_prime_impl().

inline prime_type _interface_get_nth_prime(const unsigned_integral auto &n)

Support get_nth_prime() by implementing get_nth_prime_impl().

inline void _interface_auto_expand_mapped_primes()

Support auto_expand_mapped_primes() by implementing auto_expand_mapped_primes_impl().

inline void _interface_map_next_prime()

Support auto_expand_mapped_primes() by implementing auto_expand_mapped_primes_impl().

inline size_t _interface_number_of_mapped_primes()

Support number_of_mapped_primes() by implementing number_of_mapped_primes_impl().

inline prime_type _interface_highest_odd_number_mapped()

Support highest_odd_number_mapped() by implementing highest_odd_number_mapped_impl().