BigInteger Class Reference Data Types

#include <big_integer.h>

Inheritance diagram for BigInteger:

详细描述

Reference counted class of BigIntegerInterface .

公共成员函数

  MAXON_DEFAULT_REFERENCE_CONSTRUCTORS ( BigInteger , Reference)
BigInteger operator+= (const BigInteger &b)
BigInteger operator-= (const BigInteger &b)
BigInteger operator++ ()
BigInteger   operator++ (int)
BigInteger operator-- ()
BigInteger   operator-- (int)
BigInteger operator*= (const BigInteger &b)
BigInteger operator/= (const BigInteger &b)
BigInteger operator%= (const BigInteger &b)
BigInteger operator<<= ( Int s)
BigInteger operator>>= ( 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.

参数
[in] b The second summand.
返回
The result of this + b.

◆  operator-=()

BigInteger & operator-= ( const BigInteger b )

Subtracts a value from this BigIntegers.

参数
[in] b The subtrahend.
返回
The result of this - b.

◆  operator++() [1/2]

BigInteger & operator++ ( )

The prefix operator to increment this BigInteger .

返回
The result of this + 1.

◆  operator++() [2/2]

BigInteger operator++ ( int  )

The postfix operator to increment this BigInteger .

返回
The result of this + 1.

◆  operator--() [1/2]

BigInteger & operator-- ( )

The prefix operator to decrement this BigInteger .

返回
The result of this - 1.

◆  operator--() [2/2]

BigInteger operator-- ( int  )

The postfix operator to decrement this BigInteger .

返回
The result of this - 1.

◆  operator*=()

BigInteger & operator*= ( const BigInteger b )

Multiplies another integer to the first operand.

参数
[in] b The second factor.
返回
The result of this * b.

◆  operator/=()

BigInteger & operator/= ( const BigInteger b )

Divides this by another BigInteger .

参数
[in] b The divisor. If the divisor is 0, the result will be 0.
返回
The result of a / b.

◆  operator%=()

BigInteger & operator%= ( const BigInteger b )

Calculates the modulus of two BigInteger 值。

参数
[in] b The divisor. If the divisor is 0, the result will be 0.
返回
The result of this % b.

◆  operator<<=()

BigInteger & operator<<= ( Int   s )

Shifts this BigInteger left by the specified number of bits.

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

◆  operator>>=()

BigInteger & operator>>= ( Int   s )

Shifts this BigInteger right by the specified number of bits.

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

Friends And Related Function Documentation

◆  operator+

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

Adds two BigIntegers.

参数
[in] a The fist summand.
[in] b The second summand.
返回
The result of a + b.

◆  operator- [1/2]

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

Subtracts two BigIntegers.

参数
[in] a The minuend.
[in] b The subtrahend.
返回
The result of a - b.

◆  operator- [2/2]

BigInteger operator- ( const BigInteger b )
friend

Subtracts two BigIntegers.

参数
[in] b The subtrahend.
返回
The result of this - b.

◆  operator*

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

Multiplies two BigIntegers.

参数
[in] a The fist factor.
[in] b The second factor.
返回
The result of a * b.

◆  operator/

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

Divides two BigIntegers.

参数
[in] a The dividend.
[in] b The divisor. If the divisor is 0, the result will be 0.
返回
The result of a / b.

◆  operator%

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

Calculates the modulus of two BigInteger 值。

参数
[in] a The dividend.
[in] b The divisor. If the divisor is 0, the result will be 0.
返回
The result of a % b.

◆  operator<<

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

Shifts a BigInteger left by the specified number of bits.

参数
[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.
返回
The result of a << s.

◆  operator>>

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

Shifts a BigInteger right by the specified number of bits.

参数
[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.
返回
The result of a >> s.