今天来打打java大数模板(整型)
来源:互联网 发布:12345数字打字软件 编辑:程序博客网 时间:2024/06/16 00:11
S.N. 构造函数 & 描述
1 BigInteger(byte[] val)
这个构造函数用于转换一个字节数组包含BigInteger的二进制补码,以二进制表示成一个BigInteger。
2 BigInteger(int signum, byte[] magnitude)
此构造函数用于将BigInteger的符号大小表示法转换成一个BigInteger值。
3 BigInteger(int bitLength, int certainty, Random rnd)
此构造函数用于构造一个随机生成正BigInteger的可能是以指定的bitLength的素数。
4 BigInteger(int numBits, Random rnd)
此构造函数用于构造一个随机生成的BigInteger,均匀分布在范围0到 (2numBits - 1), 包括.
5 BigInteger(String val)
此构造函数用于将BigInteger的十进制字符串表示形式转换成一个BigInteger值。
6 BigInteger(String val, int radix)
这个构造函数用于转换为BigInteger的指定基数为一个BigInteger的字符串表示形式。
类方法
S.N. 方法 & 描述
1 BigInteger abs()
此方法返回一个BigInteger,其值是此BigInteger的绝对值。
2 BigInteger add(BigInteger val)
此方法返回一个BigInteger,其值是(this + val).
3 BigInteger and(BigInteger val)
此方法返回一个BigInteger,其值是 (this & val).
4 BigInteger andNot(BigInteger val)
此方法返回一个BigInteger,其值是 (this & ~val).
5 int bitCount()
此方法返回此BigInteger的二进制补码表示的位,从符号位不同的数字。
6 int bitLength()
此方法返回位在此BigInteger的最小的二进制补码表示的数,不包括符号位。
7 BigInteger clearBit(int n)
此方法返回一个BigInteger,其值相当于此BigInteger与指定位清零。
8 int compareTo(BigInteger val)
此方法比较此BigInteger与指定的BigInteger。
9 BigInteger divide(BigInteger val)
此方法返回一个BigInteger,其值是 (this / val).
10 BigInteger[ ] divideAndRemainder(BigInteger val)
此方法返回一个包含两个BigIntegers:(this / val) 和 (this % val),其次是一个数组。
11 double doubleValue()
此方法此BigInteger转换为双精度double。
12 boolean equals(Object x)
此方法比较此BigInteger与指定对象是否相等。
13 BigInteger flipBit(int n)
此方法返回一个BigInteger,其值相当于此BigInteger与指定位翻转。
14 float floatValue()
此方法将BigInteger转换为float。
15 BigInteger gcd(BigInteger val)
此方法返回一个BigInteger,其值是绝对值的最大公约数:abs(this) 和abs(val)。
16 int getLowestSetBit()
此方法返回最右边的(最低阶)的索引在此BigInteger1比特(零比特的数量,以最右侧的1位的右侧)。
17 int hashCode()
此方法返回此BigInteger的哈希代码。
18 int intValue()
此方法此BigInteger转换为int。
19 boolean isProbablePrime(int certainty)
此方法返回true,如果此BigInteger是素数,其绝对复合数则返回false。
20 long longValue()
些方法将BigInteger转换为long。
21 BigInteger max(BigInteger val)
此方法返回此BigInteger和val的最大值。
22 BigInteger min(BigInteger val)
此方法返回此BigInteger和val的最小值。
23 BigInteger mod(BigInteger m)
此方法返回一个BigInteger,其值是(this mod m).
24 BigInteger modInverse(BigInteger m)
此方法返回一个BigInteger,其值是 (this-1 mod m).
25 BigInteger modPow(BigInteger exponent, BigInteger m)
此方法返回一个BigInteger,其值是 (thisexponent mod m).
26 BigInteger multiply(BigInteger val)
此方法返回一个BigInteger,其值是 (this * val).
27 BigInteger negate()
此方法返回一个BigInteger,其值是 (-this).
28 BigInteger nextProbablePrime()
此方法返回一个整数大于该BigInteger的可能是素数。
29 BigInteger not()
此方法返回一个BigInteger,其值是 (~this).
30 BigInteger or(BigInteger val)
此方法返回一个BigInteger,其值是 (this | val).
31 BigInteger pow(int exponent)
此方法返回一个BigInteger,其值是(thisexponent).
32 static BigInteger probablePrime(int bitLength, Random rnd)
此方法返回一个正BigInteger的可能是素数,以指定的bitLength。
33 BigInteger remainder(BigInteger val)
此方法返回一个BigInteger,其值是 (this % val).
34 BigInteger setBit(int n)
此方法返回一个BigInteger,其值相当于此BigInteger与指定的位设置。
35 BigInteger shiftLeft(int n)
此方法返回一个BigInteger,其值是 (this << n).
36 BigInteger shiftRight(int n)
此方法返回一个BigInteger,其值是 (this >> n).
37 int signum()
This method returns the signum function of this BigInteger.
38 BigInteger subtract(BigInteger val)
此方法返回一个BigInteger,其值是 (this - val).
39 boolean testBit(int n)
此方法返回当且仅当所指定的位被设置为真。
40 byte[ ] toByteArray()
此方法返回一个包含此BigInteger的二进制补码表示的字节数组。
41 String toString()
此方法返回此BigInteger的十进制字符串表示形式。
42 String toString(int radix)
此方法返回在给定的基数以BigInteger的字符串表示形式。
43 static BigInteger valueOf(long val)
此方法返回一个BigInteger,其值等于指定long。
44 BigInteger xor(BigInteger val)
此方法返回一个BigInteger,其值是 (this ^ val).
1 BigInteger(byte[] val)
这个构造函数用于转换一个字节数组包含BigInteger的二进制补码,以二进制表示成一个BigInteger。
2 BigInteger(int signum, byte[] magnitude)
此构造函数用于将BigInteger的符号大小表示法转换成一个BigInteger值。
3 BigInteger(int bitLength, int certainty, Random rnd)
此构造函数用于构造一个随机生成正BigInteger的可能是以指定的bitLength的素数。
4 BigInteger(int numBits, Random rnd)
此构造函数用于构造一个随机生成的BigInteger,均匀分布在范围0到 (2numBits - 1), 包括.
5 BigInteger(String val)
此构造函数用于将BigInteger的十进制字符串表示形式转换成一个BigInteger值。
6 BigInteger(String val, int radix)
这个构造函数用于转换为BigInteger的指定基数为一个BigInteger的字符串表示形式。
类方法
S.N. 方法 & 描述
1 BigInteger abs()
此方法返回一个BigInteger,其值是此BigInteger的绝对值。
2 BigInteger add(BigInteger val)
此方法返回一个BigInteger,其值是(this + val).
3 BigInteger and(BigInteger val)
此方法返回一个BigInteger,其值是 (this & val).
4 BigInteger andNot(BigInteger val)
此方法返回一个BigInteger,其值是 (this & ~val).
5 int bitCount()
此方法返回此BigInteger的二进制补码表示的位,从符号位不同的数字。
6 int bitLength()
此方法返回位在此BigInteger的最小的二进制补码表示的数,不包括符号位。
7 BigInteger clearBit(int n)
此方法返回一个BigInteger,其值相当于此BigInteger与指定位清零。
8 int compareTo(BigInteger val)
此方法比较此BigInteger与指定的BigInteger。
9 BigInteger divide(BigInteger val)
此方法返回一个BigInteger,其值是 (this / val).
10 BigInteger[ ] divideAndRemainder(BigInteger val)
此方法返回一个包含两个BigIntegers:(this / val) 和 (this % val),其次是一个数组。
11 double doubleValue()
此方法此BigInteger转换为双精度double。
12 boolean equals(Object x)
此方法比较此BigInteger与指定对象是否相等。
13 BigInteger flipBit(int n)
此方法返回一个BigInteger,其值相当于此BigInteger与指定位翻转。
14 float floatValue()
此方法将BigInteger转换为float。
15 BigInteger gcd(BigInteger val)
此方法返回一个BigInteger,其值是绝对值的最大公约数:abs(this) 和abs(val)。
16 int getLowestSetBit()
此方法返回最右边的(最低阶)的索引在此BigInteger1比特(零比特的数量,以最右侧的1位的右侧)。
17 int hashCode()
此方法返回此BigInteger的哈希代码。
18 int intValue()
此方法此BigInteger转换为int。
19 boolean isProbablePrime(int certainty)
此方法返回true,如果此BigInteger是素数,其绝对复合数则返回false。
20 long longValue()
些方法将BigInteger转换为long。
21 BigInteger max(BigInteger val)
此方法返回此BigInteger和val的最大值。
22 BigInteger min(BigInteger val)
此方法返回此BigInteger和val的最小值。
23 BigInteger mod(BigInteger m)
此方法返回一个BigInteger,其值是(this mod m).
24 BigInteger modInverse(BigInteger m)
此方法返回一个BigInteger,其值是 (this-1 mod m).
25 BigInteger modPow(BigInteger exponent, BigInteger m)
此方法返回一个BigInteger,其值是 (thisexponent mod m).
26 BigInteger multiply(BigInteger val)
此方法返回一个BigInteger,其值是 (this * val).
27 BigInteger negate()
此方法返回一个BigInteger,其值是 (-this).
28 BigInteger nextProbablePrime()
此方法返回一个整数大于该BigInteger的可能是素数。
29 BigInteger not()
此方法返回一个BigInteger,其值是 (~this).
30 BigInteger or(BigInteger val)
此方法返回一个BigInteger,其值是 (this | val).
31 BigInteger pow(int exponent)
此方法返回一个BigInteger,其值是(thisexponent).
32 static BigInteger probablePrime(int bitLength, Random rnd)
此方法返回一个正BigInteger的可能是素数,以指定的bitLength。
33 BigInteger remainder(BigInteger val)
此方法返回一个BigInteger,其值是 (this % val).
34 BigInteger setBit(int n)
此方法返回一个BigInteger,其值相当于此BigInteger与指定的位设置。
35 BigInteger shiftLeft(int n)
此方法返回一个BigInteger,其值是 (this << n).
36 BigInteger shiftRight(int n)
此方法返回一个BigInteger,其值是 (this >> n).
37 int signum()
This method returns the signum function of this BigInteger.
38 BigInteger subtract(BigInteger val)
此方法返回一个BigInteger,其值是 (this - val).
39 boolean testBit(int n)
此方法返回当且仅当所指定的位被设置为真。
40 byte[ ] toByteArray()
此方法返回一个包含此BigInteger的二进制补码表示的字节数组。
41 String toString()
此方法返回此BigInteger的十进制字符串表示形式。
42 String toString(int radix)
此方法返回在给定的基数以BigInteger的字符串表示形式。
43 static BigInteger valueOf(long val)
此方法返回一个BigInteger,其值等于指定long。
44 BigInteger xor(BigInteger val)
此方法返回一个BigInteger,其值是 (this ^ val).
0 0
- 今天来打打java大数模板(整型)
- HDU 1297 Children’s Queue(含整型大数模板)
- Java 大数模板
- java大数模板
- 闲来无事打打小杂也挺好
- 大数模板(HDU4927)
- 高精度模板(大数)
- 大数模板(未完成)
- 大数运算(模板)
- 大数加法 (模板)
- 大数乘法(模板)
- 大数问题(模板)
- (模板)JAVA 大数的使用
- 大数模板(大数乘小数)
- 大数相乘(大数阶乘模板)
- 大数相乘 - 整型
- 两个整型大数相加
- 大数相减(JAVA)由昨天的大数相加联想而来
- php+mysql
- 【Educational Codeforces Round 2C】【贪心】最少修改数下得到字典序尽可能小回文串
- openstack之neutron代码分析---(1)neutron初始化流程
- 转载:linux 内存管理——内核的shmall 和shmmax 参数
- Remove Duplicates from Sorted Array II
- 今天来打打java大数模板(整型)
- Android UICC 好文关键字备忘
- 【C语言提高01】冒泡排序和数组做参数的问题
- 面向对象设计的原则
- mysql 存储长文本
- 从结构体角度浅谈C语言的数据类型和变量
- 一位90后女生的IT之旅
- 对链式队列结构实现的探讨
- 黑马程序员——基础笔记:程序解释—注释