BWAPI
Classes | Typedefs | Functions
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/CORE/BigInt.h File Reference
#include <CGAL/CORE/Gmp.h>
#include <CGAL/CORE/RefCount.h>
#include <CGAL/CORE/MemoryPool.h>
#include <string>
Include dependency graph for BigInt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BigIntRep
class  BigInt

Typedefs

typedef RCImpl< BigIntRepRCBigInt

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_tgetRandstate ()
void seed (const BigInt &a)
 seed function
BigInt randomize (const BigInt &a)
 randomize function

Typedef Documentation


Function Documentation

BigInt abs ( const BigInt a) [inline]

abs

Here is the call graph for this function:

int bitLength ( const BigInt a) [inline]

Here is the call graph for this function:

Here is the caller graph for this function:

long ceilLg ( const BigInt a) [inline]

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.

Here is the call graph for this function:

Here is the caller graph for this function:

long ceilLg ( long  a) [inline]

Here is the call graph for this function:

long ceilLg ( int  a) [inline]

Here is the call graph for this function:

int cmp ( const BigInt x,
const BigInt y 
) [inline]

Here is the call graph for this function:

int cmpabs ( const BigInt a,
const BigInt b 
) [inline]

cmpabs

Here is the call graph for this function:

BigInt div_exact ( const BigInt x,
const BigInt y 
) [inline]

Here is the call graph for this function:

int div_exact ( int  x,
int  y 
) [inline]
long div_exact ( long  x,
long  y 
) [inline]
void div_rem ( BigInt q,
BigInt r,
const BigInt a,
const BigInt b 
) [inline]

div_rem

Here is the call graph for this function:

void divexact ( BigInt z,
const BigInt x,
const BigInt y 
) [inline]

exact div

Here is the call graph for this function:

Here is the caller graph for this function:

double doubleValue ( const BigInt a) [inline]

doubleValue

Here is the call graph for this function:

long floorLg ( const BigInt a) [inline]

floorLg -- floor of log_2(a)

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

Here is the call graph for this function:

Here is the caller graph for this function:

BigInt gcd ( const BigInt a,
const BigInt b 
) [inline]

gcd

Here is the call graph for this function:

unsigned long getBinExpo ( const BigInt z) [inline]

get exponent of power 2

Here is the call graph for this function:

Here is the caller graph for this function:

void getKaryExpo ( const BigInt z,
BigInt m,
int &  e,
unsigned long  k 
) [inline]

get exponent of power k

Here is the call graph for this function:

Here is the caller graph for this function:

bool isDivisible ( const BigInt x,
const BigInt y 
) [inline]

divisible(x,y) = "x | y"

Here is the call graph for this function:

bool isDivisible ( int  x,
int  y 
) [inline]
bool isDivisible ( long  x,
long  y 
) [inline]
bool isEven ( const BigInt z) [inline]

isEven

Here is the call graph for this function:

bool isOdd ( const BigInt z) [inline]

isOdd

Here is the call graph for this function:

long longValue ( const BigInt a) [inline]

longValue

Here is the call graph for this function:

BigInt neg ( const BigInt a) [inline]

neg

Here is the call graph for this function:

Here is the caller graph for this function:

void negate ( BigInt a) [inline]

negate

Here is the call graph for this function:

Here is the caller graph for this function:

bool operator!= ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt operator% ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt operator& ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt operator* ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt operator+ ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt operator- ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt operator/ ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

bool operator< ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt operator<< ( const BigInt a,
unsigned long  ul 
) [inline]

Here is the call graph for this function:

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

Here is the call graph for this function:

bool operator<= ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

bool operator== ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

bool operator> ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

bool operator>= ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt operator>> ( const BigInt a,
unsigned long  ul 
) [inline]

Here is the call graph for this function:

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

Here is the call graph for this function:

BigInt operator^ ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt operator| ( const BigInt a,
const BigInt b 
) [inline]

Here is the call graph for this function:

BigInt pow ( const BigInt a,
unsigned long  ui 
) [inline]

Here is the call graph for this function:

void power ( BigInt c,
const BigInt a,
unsigned long  ul 
) [inline]

power

Here is the call graph for this function:

BigInt randomize ( const BigInt a) [inline]

randomize function

Here is the call graph for this function:

Here is the caller graph for this function:

void readFromFile ( BigInt z,
std::istream &  in,
long  maxLength = 0 
)

read from file

void seed ( const BigInt a) [inline]

seed function

Here is the call graph for this function:

Here is the caller graph for this function:

int sign ( const BigInt a) [inline]

sign

Here is the call graph for this function:

unsigned long ulongValue ( const BigInt a) [inline]

ulongValue

Here is the call graph for this function:

Here is the caller graph for this function:

void writeToFile ( const BigInt z,
std::ostream &  in,
int  base = 10,
int  charsPerLine = 80 
)

write to file

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines