C# 클래스 BooRunner.Tools.DigitHelper

Contains big integer uint[] digits utilitary methods.
파일 보기 프로젝트 열기: juanplopes/euler

공개 메소드들

메소드 설명
DigitsBlockCopy ( uint blockFrom, uint blockTo, uint count ) : void

Copies digits from one block to another.

GetMinMaxLengthObjects ( BigInteger int1, BigInteger int2, BigInteger &smallerInt, BigInteger &biggerInt ) : void

Determines BigInteger object with lower length.

GetRealDigitsLength ( uint digits, uint length ) : uint

Returns real length of digits array (excluding leading zeroes).

SetBlockDigits ( double block, uint blockLength, double value ) : void

Sets digits in given block to given value.

SetBlockDigits ( uint block, uint blockLength, uint value ) : void

Sets digits in given block to given value.

ToUInt32WithSign ( int value, uint &resultValue, bool &negative ) : void

Converts int value to uint digit and value sign.

ToUInt64WithSign ( long value, ulong &resultValue, bool &negative ) : void

Converts long value to ulong digit and value sign.

메소드 상세

DigitsBlockCopy() 공개 정적인 메소드

Copies digits from one block to another.
public static DigitsBlockCopy ( uint blockFrom, uint blockTo, uint count ) : void
blockFrom uint From block start pointer.
blockTo uint To block start pointer.
count uint Count of dwords to copy.
리턴 void

GetMinMaxLengthObjects() 공개 정적인 메소드

Determines BigInteger object with lower length.
public static GetMinMaxLengthObjects ( BigInteger int1, BigInteger int2, BigInteger &smallerInt, BigInteger &biggerInt ) : void
int1 BigInteger First big integer.
int2 BigInteger Second big integer.
smallerInt BigInteger Resulting smaller big integer (by length only).
biggerInt BigInteger Resulting bigger big integer (by length only).
리턴 void

GetRealDigitsLength() 공개 정적인 메소드

Returns real length of digits array (excluding leading zeroes).
public static GetRealDigitsLength ( uint digits, uint length ) : uint
digits uint Big ingeter digits.
length uint Initial big integers length.
리턴 uint

SetBlockDigits() 공개 정적인 메소드

Sets digits in given block to given value.
public static SetBlockDigits ( double block, uint blockLength, double value ) : void
block double Block start pointer.
blockLength uint Block length.
value double Value to set.
리턴 void

SetBlockDigits() 공개 정적인 메소드

Sets digits in given block to given value.
public static SetBlockDigits ( uint block, uint blockLength, uint value ) : void
block uint Block start pointer.
blockLength uint Block length.
value uint Value to set.
리턴 void

ToUInt32WithSign() 공개 정적인 메소드

Converts int value to uint digit and value sign.
public static ToUInt32WithSign ( int value, uint &resultValue, bool &negative ) : void
value int Initial value.
resultValue uint Resulting unsigned part.
negative bool Resulting sign.
리턴 void

ToUInt64WithSign() 공개 정적인 메소드

Converts long value to ulong digit and value sign.
public static ToUInt64WithSign ( long value, ulong &resultValue, bool &negative ) : void
value long Initial value.
resultValue ulong Resulting unsigned part.
negative bool Resulting sign.
리턴 void