C# 클래스 IntXLib.OpHelper

Contains helping methods for operations over IntX.
파일 보기 프로젝트 열기: devoyster/IntXLib

공개 메소드들

메소드 설명
Add ( IntX int1, IntX int2 ) : IntX

Adds two big integers.

AddSub ( IntX int1, IntX int2, bool subtract ) : IntX

Adds/subtracts one IntX to/from another. Determines which operation to use basing on operands signs.

BitwiseAnd ( IntX int1, IntX int2 ) : IntX

Performs bitwise AND for two big integers.

BitwiseOr ( IntX int1, IntX int2 ) : IntX

Performs bitwise OR for two big integers.

Cmp ( IntX int1, IntX int2, bool throwNullException ) : int

Compares 2 IntX objects. Returns "-2" if any argument is null, "-1" if int1 < int2, "0" if equal and "1" if >.

Cmp ( IntX int1, int int2 ) : int

Compares IntX object to int. Returns "-1" if int1 < int2, "0" if equal and "1" if >.

Cmp ( IntX int1, uint int2 ) : int

Compares IntX object to unsigned int. Returns "-1" if int1 < int2, "0" if equal and "1" if >. For internal use.

ExclusiveOr ( IntX int1, IntX int2 ) : IntX

Performs bitwise XOR for two big integers.

OnesComplement ( IntX value ) : IntX

Performs bitwise NOT for big integer.

Pow ( IntX value, uint power, MultiplyMode multiplyMode ) : IntX

Returns a specified big integer raised to the specified power.

Sh ( IntX intX, long shift, bool toLeft ) : IntX

Shifts IntX object. Determines which operation to use basing on shift sign.

Sub ( IntX int1, IntX int2 ) : IntX

Subtracts two big integers.

메소드 상세

Add() 공개 정적인 메소드

Adds two big integers.
or is too big for add operation.
public static Add ( IntX int1, IntX int2 ) : IntX
int1 IntX First big integer.
int2 IntX Second big integer.
리턴 IntX

AddSub() 공개 정적인 메소드

Adds/subtracts one IntX to/from another. Determines which operation to use basing on operands signs.
or is a null reference.
public static AddSub ( IntX int1, IntX int2, bool subtract ) : IntX
int1 IntX First big integer.
int2 IntX Second big integer.
subtract bool Was subtraction initially.
리턴 IntX

BitwiseAnd() 공개 정적인 메소드

Performs bitwise AND for two big integers.
public static BitwiseAnd ( IntX int1, IntX int2 ) : IntX
int1 IntX First big integer.
int2 IntX Second big integer.
리턴 IntX

BitwiseOr() 공개 정적인 메소드

Performs bitwise OR for two big integers.
public static BitwiseOr ( IntX int1, IntX int2 ) : IntX
int1 IntX First big integer.
int2 IntX Second big integer.
리턴 IntX

Cmp() 공개 정적인 메소드

Compares 2 IntX objects. Returns "-2" if any argument is null, "-1" if int1 < int2, "0" if equal and "1" if >.
or is a null reference and is set to true.
public static Cmp ( IntX int1, IntX int2, bool throwNullException ) : int
int1 IntX First big integer.
int2 IntX Second big integer.
throwNullException bool Raises or not .
리턴 int

Cmp() 공개 정적인 메소드

Compares IntX object to int. Returns "-1" if int1 < int2, "0" if equal and "1" if >.
public static Cmp ( IntX int1, int int2 ) : int
int1 IntX First big integer.
int2 int Second integer.
리턴 int

Cmp() 공개 정적인 메소드

Compares IntX object to unsigned int. Returns "-1" if int1 < int2, "0" if equal and "1" if >. For internal use.
public static Cmp ( IntX int1, uint int2 ) : int
int1 IntX First big integer.
int2 uint Second unsigned integer.
리턴 int

ExclusiveOr() 공개 정적인 메소드

Performs bitwise XOR for two big integers.
public static ExclusiveOr ( IntX int1, IntX int2 ) : IntX
int1 IntX First big integer.
int2 IntX Second big integer.
리턴 IntX

OnesComplement() 공개 정적인 메소드

Performs bitwise NOT for big integer.
public static OnesComplement ( IntX value ) : IntX
value IntX Big integer.
리턴 IntX

Pow() 공개 정적인 메소드

Returns a specified big integer raised to the specified power.
is a null reference.
public static Pow ( IntX value, uint power, MultiplyMode multiplyMode ) : IntX
value IntX Number to raise.
power uint Power.
multiplyMode MultiplyMode Multiply mode set explicitly.
리턴 IntX

Sh() 공개 정적인 메소드

Shifts IntX object. Determines which operation to use basing on shift sign.
is a null reference.
public static Sh ( IntX intX, long shift, bool toLeft ) : IntX
intX IntX Big integer.
shift long Bits count to shift.
toLeft bool If true the shifting to the left.
리턴 IntX

Sub() 공개 정적인 메소드

Subtracts two big integers.
public static Sub ( IntX int1, IntX int2 ) : IntX
int1 IntX First big integer.
int2 IntX Second big integer.
리턴 IntX