本文整理汇总了C++中PrimeSieve::setSieveSize方法的典型用法代码示例。如果您正苦于以下问题:C++ PrimeSieve::setSieveSize方法的具体用法?C++ PrimeSieve::setSieveSize怎么用?C++ PrimeSieve::setSieveSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PrimeSieve
的用法示例。
在下文中一共展示了PrimeSieve::setSieveSize方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: count_sextuplets
uint64_t count_sextuplets(uint64_t start, uint64_t stop)
{
PrimeSieve ps;
ps.setSieveSize(get_sieve_size());
return ps.countSextuplets(start, stop);
}
示例2: count_twins
uint64_t count_twins(uint64_t start, uint64_t stop)
{
PrimeSieve ps;
ps.setSieveSize(get_sieve_size());
return ps.countTwins(start, stop);
}
示例3: nth_prime
uint64_t nth_prime(int64_t n, uint64_t start)
{
PrimeSieve ps;
ps.setSieveSize(get_sieve_size());
return ps.nthPrime(n, start);
}
示例4: callback_primes
void callback_primes(uint64_t start, uint64_t stop, Callback<uint64_t>* callback)
{
PrimeSieve ps;
ps.setSieveSize(get_sieve_size());
ps.callbackPrimes(start, stop, callback);
}
示例5: print_sextuplets
void print_sextuplets(uint64_t start, uint64_t stop)
{
PrimeSieve ps;
ps.setSieveSize(get_sieve_size());
ps.printSextuplets(start, stop);
}
示例6: print_twins
void print_twins(uint64_t start, uint64_t stop)
{
PrimeSieve ps;
ps.setSieveSize(get_sieve_size());
ps.printTwins(start, stop);
}