sieve.h
来自「包含哈希,对称以及非对称的经典算法 包含经典事例」· C头文件 代码 · 共 32 行
H
32 行
/* * sieve.h - Trial division for prime finding. * * This is generally not intended for direct use by a user of the library; * the prime.c and dhprime.c functions. are more likely to be used. * However, a special application may need these. */struct BigNum;#ifdef __cplusplusextern "C" {#endif/* Remove multiples of a single number from the sieve */voidsieveSingle(unsigned char *array, unsigned size, unsigned start, unsigned step);/* Build a sieve starting at the number and incrementing by "step". */int sieveBuild(unsigned char *array, unsigned size, struct BigNum const *bn, unsigned step, unsigned dbl);/* Similar, but uses a >16-bit step size */int sieveBuildBig(unsigned char *array, unsigned size, struct BigNum const *bn, struct BigNum const *step, unsigned dbl);/* Return the next bit set in the sieve (or 0 on failure) */unsigned sieveSearch(unsigned char const *array, unsigned size, unsigned start);#ifdef __cplusplus}#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?