|
BWAPI
|
#include <CGAL/CORE/Gmp.h>#include <CGAL/CORE/RefCount.h>#include <CGAL/CORE/MemoryPool.h>#include <string>

Go to the source code of this file.
Classes | |
| class | BigIntRep |
| class | BigInt |
Typedefs | |
| typedef RCImpl< BigIntRep > | RCBigInt |
Functions | |
| BigInt | operator+ (const BigInt &a, const BigInt &b) |
| BigInt | operator- (const BigInt &a, const BigInt &b) |
| BigInt | operator* (const BigInt &a, const BigInt &b) |
| BigInt | operator/ (const BigInt &a, const BigInt &b) |
| BigInt | operator% (const BigInt &a, const BigInt &b) |
| BigInt | operator& (const BigInt &a, const BigInt &b) |
| BigInt | operator| (const BigInt &a, const BigInt &b) |
| BigInt | operator^ (const BigInt &a, const BigInt &b) |
| BigInt | operator<< (const BigInt &a, unsigned long ul) |
| BigInt | operator>> (const BigInt &a, unsigned long ul) |
| int | cmp (const BigInt &x, const BigInt &y) |
| bool | operator== (const BigInt &a, const BigInt &b) |
| bool | operator!= (const BigInt &a, const BigInt &b) |
| bool | operator>= (const BigInt &a, const BigInt &b) |
| bool | operator> (const BigInt &a, const BigInt &b) |
| bool | operator<= (const BigInt &a, const BigInt &b) |
| bool | operator< (const BigInt &a, const BigInt &b) |
| std::ostream & | operator<< (std::ostream &o, const BigInt &x) |
| std::istream & | operator>> (std::istream &i, BigInt &x) |
| int | sign (const BigInt &a) |
| sign | |
| BigInt | abs (const BigInt &a) |
| abs | |
| BigInt | neg (const BigInt &a) |
| neg | |
| void | negate (BigInt &a) |
| negate | |
| int | cmpabs (const BigInt &a, const BigInt &b) |
| cmpabs | |
Conversion Functions | |
| long | longValue (const BigInt &a) |
| longValue | |
| unsigned long | ulongValue (const BigInt &a) |
| ulongValue | |
| double | doubleValue (const BigInt &a) |
| doubleValue | |
File I/O Functions | |
| void | readFromFile (BigInt &z, std::istream &in, long maxLength=0) |
| read from file | |
| void | writeToFile (const BigInt &z, std::ostream &in, int base=10, int charsPerLine=80) |
| write to file | |
Misc Functions | |
| bool | isEven (const BigInt &z) |
| isEven | |
| bool | isOdd (const BigInt &z) |
| isOdd | |
| unsigned long | getBinExpo (const BigInt &z) |
| get exponent of power 2 | |
| void | getKaryExpo (const BigInt &z, BigInt &m, int &e, unsigned long k) |
| get exponent of power k | |
| bool | isDivisible (const BigInt &x, const BigInt &y) |
| divisible(x,y) = "x | y" | |
| bool | isDivisible (int x, int y) |
| bool | isDivisible (long x, long y) |
| void | divexact (BigInt &z, const BigInt &x, const BigInt &y) |
| exact div | |
| BigInt | div_exact (const BigInt &x, const BigInt &y) |
| int | div_exact (int x, int y) |
| long | div_exact (long x, long y) |
| BigInt | gcd (const BigInt &a, const BigInt &b) |
| gcd | |
| void | div_rem (BigInt &q, BigInt &r, const BigInt &a, const BigInt &b) |
| div_rem | |
| void | power (BigInt &c, const BigInt &a, unsigned long ul) |
| power | |
| BigInt | pow (const BigInt &a, unsigned long ui) |
| int | bitLength (const BigInt &a) |
| long | floorLg (const BigInt &a) |
| floorLg -- floor of log_2(a) | |
| long | ceilLg (const BigInt &a) |
| ceilLg -- ceiling of log_2(a) where a=BigInt, int or long | |
| long | ceilLg (long a) |
| long | ceilLg (int a) |
| gmp_randstate_t * | getRandstate () |
| void | seed (const BigInt &a) |
| seed function | |
| BigInt | randomize (const BigInt &a) |
| randomize function | |


ceilLg -- ceiling of log_2(a) where a=BigInt, int or long
Convention: a=0, ceilLg(a) returns -1. This makes sense for integer a.


| long ceilLg | ( | long | a | ) | [inline] |

| long ceilLg | ( | int | a | ) | [inline] |

cmpabs


| int div_exact | ( | int | x, |
| int | y | ||
| ) | [inline] |
| long div_exact | ( | long | x, |
| long | y | ||
| ) | [inline] |
div_rem

exact div


| double doubleValue | ( | const BigInt & | a | ) | [inline] |
doubleValue

floorLg -- floor of log_2(a)
Convention: a=0, floorLg(a) returns -1. This makes sense for integer a.


gcd

| unsigned long getBinExpo | ( | const BigInt & | z | ) | [inline] |
get exponent of power 2


| void getKaryExpo | ( | const BigInt & | z, |
| BigInt & | m, | ||
| int & | e, | ||
| unsigned long | k | ||
| ) | [inline] |
get exponent of power k


| bool isDivisible | ( | const BigInt & | x, |
| const BigInt & | y | ||
| ) | [inline] |
divisible(x,y) = "x | y"

| bool isDivisible | ( | int | x, |
| int | y | ||
| ) | [inline] |
| bool isDivisible | ( | long | x, |
| long | y | ||
| ) | [inline] |
neg


negate











| std::ostream& operator<< | ( | std::ostream & | o, |
| const BigInt & | x | ||
| ) | [inline] |






| std::istream& operator>> | ( | std::istream & | i, |
| BigInt & | x | ||
| ) | [inline] |




power

randomize function


| void readFromFile | ( | BigInt & | z, |
| std::istream & | in, | ||
| long | maxLength = 0 |
||
| ) |
read from file
seed function


| unsigned long ulongValue | ( | const BigInt & | a | ) | [inline] |
ulongValue


| void writeToFile | ( | const BigInt & | z, |
| std::ostream & | in, | ||
| int | base = 10, |
||
| int | charsPerLine = 80 |
||
| ) |
write to file
1.7.6.1