BigInteger Class Reference

`#include <big_integer.h>`

Inheritance diagram for BigInteger:

Detailed Description

Reference counted class of BigIntegerInterface.

Public Member Functions

MAXON_DEFAULT_REFERENCE_CONSTRUCTORS (BigInteger, Reference)

BigIntegeroperator+= (const BigInteger &b)

BigIntegeroperator-= (const BigInteger &b)

BigIntegeroperator++ ()

BigInteger operator++ (int)

BigIntegeroperator-- ()

BigInteger operator-- (int)

BigIntegeroperator*= (const BigInteger &b)

BigIntegeroperator/= (const BigInteger &b)

BigIntegeroperator%= (const BigInteger &b)

BigIntegeroperator<<= (Int s)

BigIntegeroperator>>= (Int s)

Friends

BigInteger operator+ (const BigInteger &a, const BigInteger &b)

BigInteger operator- (const BigInteger &a, const BigInteger &b)

BigInteger operator- (const BigInteger &b)

BigInteger operator* (const BigInteger &a, const BigInteger &b)

BigInteger operator/ (const BigInteger &a, const BigInteger &b)

BigInteger operator% (const BigInteger &a, const BigInteger &b)

BigInteger operator<< (const BigInteger &a, Int s)

BigInteger operator>> (const BigInteger &a, Int s)

◆ MAXON_DEFAULT_REFERENCE_CONSTRUCTORS()

 MAXON_DEFAULT_REFERENCE_CONSTRUCTORS ( BigInteger , Reference )

◆ operator+=()

 BigInteger& operator+= ( const BigInteger & b )

Adds another integer to the first operand.

Parameters
 [in] b The second summand.
Returns
The result of this + b.

◆ operator-=()

 BigInteger& operator-= ( const BigInteger & b )

Subtracts a value from this BigIntegers.

Parameters
 [in] b The subtrahend.
Returns
The result of this - b.

◆ operator++() [1/2]

 BigInteger& operator++ ( )

The prefix operator to increment this BigInteger.

Returns
The result of this + 1.

◆ operator++() [2/2]

 BigInteger operator++ ( int )

The postfix operator to increment this BigInteger.

Returns
The result of this + 1.

◆ operator--() [1/2]

 BigInteger& operator-- ( )

The prefix operator to decrement this BigInteger.

Returns
The result of this - 1.

◆ operator--() [2/2]

 BigInteger operator-- ( int )

The postfix operator to decrement this BigInteger.

Returns
The result of this - 1.

◆ operator*=()

 BigInteger& operator*= ( const BigInteger & b )

Multiplies another integer to the first operand.

Parameters
 [in] b The second factor.
Returns
The result of this * b.

◆ operator/=()

 BigInteger& operator/= ( const BigInteger & b )

Divides this by another BigInteger.

Parameters
 [in] b The divisor. If the divisor is 0, the result will be 0.
Returns
The result of a / b.

◆ operator%=()

 BigInteger& operator%= ( const BigInteger & b )

Calculates the modulus of two BigInteger values.

Parameters
 [in] b The divisor. If the divisor is 0, the result will be 0.
Returns
The result of this % b.

◆ operator<<=()

 BigInteger& operator<<= ( Int s )

Shifts this BigInteger left by the specified number of bits.

Parameters
 [in] s The number of bits to left-shift the value. If this is negative, the value is shifted right.
Returns
The result of this << s.

◆ operator>>=()

 BigInteger& operator>>= ( Int s )

Shifts this BigInteger right by the specified number of bits.

Parameters
 [in] s The number of bits to right-shift the value. If this is negative, the value is shifted left.
Returns
The result of this >> s.

◆ operator+

 BigInteger operator+ ( const BigInteger & a, const BigInteger & b )
friend

Parameters
 [in] a The fist summand. [in] b The second summand.
Returns
The result of a + b.

◆ operator- [1/2]

 BigInteger operator- ( const BigInteger & a, const BigInteger & b )
friend

Subtracts two BigIntegers.

Parameters
 [in] a The minuend. [in] b The subtrahend.
Returns
The result of a - b.

◆ operator- [2/2]

 BigInteger operator- ( const BigInteger & b )
friend

Subtracts two BigIntegers.

Parameters
 [in] b The subtrahend.
Returns
The result of this - b.

◆ operator*

 BigInteger operator* ( const BigInteger & a, const BigInteger & b )
friend

Multiplies two BigIntegers.

Parameters
 [in] a The fist factor. [in] b The second factor.
Returns
The result of a * b.

◆ operator/

 BigInteger operator/ ( const BigInteger & a, const BigInteger & b )
friend

Divides two BigIntegers.

Parameters
 [in] a The dividend. [in] b The divisor. If the divisor is 0, the result will be 0.
Returns
The result of a / b.

◆ operator%

 BigInteger operator% ( const BigInteger & a, const BigInteger & b )
friend

Calculates the modulus of two BigInteger values.

Parameters
 [in] a The dividend. [in] b The divisor. If the divisor is 0, the result will be 0.
Returns
The result of a % b.

◆ operator<<

 BigInteger operator<< ( const BigInteger & a, Int s )
friend

Shifts a BigInteger left by the specified number of bits.

Parameters
 [in] a The source operand. [in] s The number of bits to left-shift the value. If this is negative, the value is shifted right.
Returns
The result of a << s.

◆ operator>>

 BigInteger operator>> ( const BigInteger & a, Int s )
friend

Shifts a BigInteger right by the specified number of bits.

Parameters
 [in] a The source operand. [in] s The number of bits to right-shift the value. If this is negative, the value is shifted left.
Returns
The result of a >> s.