📄 constants.java
字号:
package javax.math.factorization;
/**
* <p>Title: Factorization Library</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: </p>
* @author Vladimir Silva
* @version 1.0
*/
import java.math.BigInteger;
public interface Constants
{
static final int PWmax=32, Qmax=30241, LEVELmax=11;
static final BigInteger BigInt0 = BigInteger.valueOf(0L);
static final BigInteger BigInt1 = BigInteger.valueOf(1L);
static final BigInteger BigInt2 = BigInteger.valueOf(2L);
static final BigInteger BigInt3 = BigInteger.valueOf(3L);
// static final int NLen = 1200;
static final long DosALa32 = (long)1 << 32;
static final long DosALa31 = (long)1 << 31;
static final long DosALa31_1 = DosALa31 - 1;
static final long DosALa63 = DosALa32 * DosALa31;
static final long AdjustDiv = 3 * DosALa31 * DosALa31;
static final double dDosALa32 = (double)DosALa32;
static final double dDosALa64 = dDosALa32 * dDosALa32;
static final double dDosALa96 = dDosALa64 * dDosALa32;
static final double dDosALa128 = dDosALa96 * dDosALa32;
static final double dDosALa160 = dDosALa128 * dDosALa32;
static final long MaxUInt = DosALa32 - 1;
static final long Mi = 1000000000;
// MP = MultiPrecision
static final int MP_INITIAL_SIZE = 1200;
static final int SMALL_FACTOR_LIMIT = 131072;
static final int MAX_PW = 32, MAX_Q = 30241, MAX_LEVEL = 11;
// factorizarion types
static final int TYPE_AURIF = 100000000;
static final int TYPE_TABLE = 150000000;
static final int TYPE_SIQS = 200000000;
static final int TYPE_EC = 300000000;
static final int aiP[] = {
2, 3, 5, 7, 11, 13};
static final int aiQ[] = {
2, 3, 5, 7, 13, 11, 31, 61, 19, 37, 181,
29, 43, 71, 127, 211, 421, 631, 41, 73, 281,
2521, 17, 113, 241, 337, 1009, 109, 271, 379,
433, 541, 757, 2161, 7561, 15121, 23, 67, 89,
199, 331, 397, 463, 617, 661, 881, 991, 1321,
2311, 2377, 2971, 3697, 4159, 4621, 8317, 9241,
16633, 18481, 23761, 101, 151, 401, 601, 701,
1051, 1201, 1801, 2801, 3301, 3851, 4201, 4951,
6301, 9901, 11551, 12601, 14851, 15401, 19801,
97, 353, 673, 2017, 3169, 3361, 5281, 7393,
21601, 30241, 53, 79, 131, 157, 313, 521, 547,
859, 911, 937, 1093, 1171, 1249, 1301, 1873,
1951, 2003, 2081, 41, 2731, 2861, 3121, 3433,
3511, 5851, 6007, 6553, 7151, 7723, 8009, 8191,
8581, 8737, 9829, 11701, 13729, 14561, 15601,
16381, 17551, 20021, 20593, 21841, 24571, 25741,
26209, 28081};
static final int aiG[] = {
1, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 3, 7,
3, 2, 2, 3, 6, 5, 3, 17, 3, 3, 7, 10, 11,
6, 6, 2, 5, 2, 2, 23, 13, 11, 5, 2, 3, 3,
3, 5, 3, 3, 2, 3, 6, 13, 3, 5, 10, 5, 3,
2, 6, 13, 15, 13, 7, 2, 6, 3, 7, 2, 7, 11,
11, 3, 6, 2, 11, 6, 10, 2, 7, 11, 2, 6, 13,
5, 3, 5, 5, 7, 22, 7, 5, 7, 11, 2, 3, 2,
5, 10, 3, 2, 2, 17, 5, 5, 2, 7, 2, 10, 3,
5, 3, 7, 3, 2, 7, 5, 7, 2, 3, 10, 7, 3, 3,
17, 6, 5, 10, 6, 23, 6, 23, 2, 3, 3, 5, 11,
7, 6, 11, 19};
static final int aiT[] = {
2 * 2 * 3, 2 * 2 * 3 * 5, 2 * 2 * 3 * 3 * 5, 2 * 2 * 3 * 3 * 5 * 7,
2 * 2 * 2 * 3 * 3 * 5 * 7, 2 * 2 * 2 * 2 * 3 * 3 * 5 * 7,
2 * 2 * 2 * 2 * 3 * 3 * 3 * 5 * 7,
2 * 2 * 2 * 2 * 3 * 3 * 3 * 5 * 7 * 11,
2 * 2 * 2 * 2 * 3 * 3 * 3 * 5 * 5 * 7 * 11,
2 * 2 * 2 * 2 * 2 * 3 * 3 * 3 * 5 * 5 * 7 * 11,
2 * 2 * 2 * 2 * 2 * 3 * 3 * 3 * 5 * 5 * 7 * 11 * 13};
static final int aiNP[] = {
2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6};
static final int aiNQ[] = {
5, 8, 11, 18, 22, 27, 36, 59, 79, 89, 136};
final int aiIndx[] = new int[MAX_Q];
final int aiF[] = new int[MAX_Q];
final int aiInv[] = new int[MAX_PW];
final long biTmp[] = new long[Constants.MP_INITIAL_SIZE];
final long biExp[] = new long[Constants.MP_INITIAL_SIZE];
final long biN[] = new long[Constants.MP_INITIAL_SIZE];
final long biR[] = new long[Constants.MP_INITIAL_SIZE];
final long biS[] = new long[Constants.MP_INITIAL_SIZE];
final long biT[] = new long[Constants.MP_INITIAL_SIZE];
final long biU[] = new long[Constants.MP_INITIAL_SIZE];
final long biV[] = new long[Constants.MP_INITIAL_SIZE];
final long biW[] = new long[Constants.MP_INITIAL_SIZE];
final long aiJS[][] = new long[MAX_PW][Constants.MP_INITIAL_SIZE];
final long aiJW[][] = new long[MAX_PW][Constants.MP_INITIAL_SIZE];
final long aiJX[][] = new long[MAX_PW][Constants.MP_INITIAL_SIZE];
final long aiJ0[][] = new long[MAX_PW][Constants.MP_INITIAL_SIZE];
final long aiJ1[][] = new long[MAX_PW][Constants.MP_INITIAL_SIZE];
final long aiJ2[][] = new long[MAX_PW][Constants.MP_INITIAL_SIZE];
final long aiJ00[][] = new long[MAX_PW][Constants.MP_INITIAL_SIZE];
final long aiJ01[][] = new long[MAX_PW][Constants.MP_INITIAL_SIZE];
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -