C# Класс BooRunner.Tools.DigitHelper

Contains big integer uint[] digits utilitary methods.
Показать файл Открыть проект

Открытые методы

Метод Описание
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