C# Класс Granados.Mono.Math.BigInteger

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
BigInteger System
BigInteger System
BigInteger System
BigInteger System
ClearBit void
Modulus uint
Normalize void
SetBit void
SetBit void
TestBit bool
ToString string
ToString string
operator bool
operator uint

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

Метод Описание
Add ( BigInteger bi1, BigInteger bi2 ) : BigInteger
BigInteger ( ) : System
BigInteger ( BigInteger bi ) : System
BigInteger ( byte inData ) : System
BitCount ( ) : int
Clear ( ) : void
Compare ( BigInteger bi ) : Sign
Divid ( BigInteger bi1, BigInteger bi2 ) : BigInteger
Divid ( BigInteger bi, int i ) : BigInteger
Equals ( object o ) : bool
GCD ( BigInteger bi ) : BigInteger
GeneratePseudoPrime ( int bits ) : BigInteger
GenerateRandom ( int bits ) : BigInteger

Generates a new, random BigInteger of the specified length using the default RNG crypto service provider.

GenerateRandom ( int bits, RandomNumberGenerator rng ) : BigInteger

Generates a new, random BigInteger of the specified length.

GetBytes ( ) : byte[]
GetHashCode ( ) : int
Incr2 ( ) : void

Increments this by two

IsProbablePrime ( ) : bool
LowestSetBit ( ) : int
ModInverse ( BigInteger modulus ) : BigInteger
ModPow ( BigInteger exp, BigInteger n ) : BigInteger
Modulus ( BigInteger bi1, BigInteger bi2 ) : BigInteger
Modulus ( BigInteger bi, int i ) : int
Multiply ( BigInteger bi1, BigInteger bi2 ) : BigInteger
Multiply ( BigInteger bi, int i ) : BigInteger
NextHighestPrime ( BigInteger bi ) : BigInteger

Generates the smallest prime >= bi

Parse ( string number ) : BigInteger
Randomize ( ) : void

Randomizes the bits in "this" from the default RNG.

Randomize ( RandomNumberGenerator rng ) : void

Randomizes the bits in "this" from the specified RNG.

Subtract ( BigInteger bi1, BigInteger bi2 ) : BigInteger
TestBit ( int bitNum ) : bool
ToString ( ) : string
operator ( ) : BigInteger
operator ( ) : int

Приватные методы

Метод Описание
BigInteger ( BigInteger bi, uint len ) : System
BigInteger ( Sign sign, uint len ) : System
BigInteger ( uint inData ) : System
BigInteger ( ulong ul ) : System
ClearBit ( uint bitNum ) : void
Modulus ( BigInteger bi, uint ui ) : uint
Normalize ( ) : void

Normalizes this by setting the length to the actual number of uints used in data and by setting the sign to Sign.Zero if the value of this is 0.

SetBit ( uint bitNum ) : void
SetBit ( uint bitNum, bool value ) : void
TestBit ( uint bitNum ) : bool
ToString ( uint radix ) : string
ToString ( uint radix, string characterSet ) : string
operator ( ) : bool
operator ( ) : uint

Описание методов

Add() публичный статический Метод

public static Add ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Результат BigInteger

BigInteger() публичный Метод

public BigInteger ( ) : System
Результат System

BigInteger() публичный Метод

public BigInteger ( BigInteger bi ) : System
bi BigInteger
Результат System

BigInteger() публичный Метод

public BigInteger ( byte inData ) : System
inData byte
Результат System

BitCount() публичный Метод

public BitCount ( ) : int
Результат int

Clear() публичный Метод

public Clear ( ) : void
Результат void

Compare() публичный Метод

public Compare ( BigInteger bi ) : Sign
bi BigInteger
Результат Sign

Divid() публичный статический Метод

public static Divid ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Результат BigInteger

Divid() публичный статический Метод

public static Divid ( BigInteger bi, int i ) : BigInteger
bi BigInteger
i int
Результат BigInteger

Equals() публичный Метод

public Equals ( object o ) : bool
o object
Результат bool

GCD() публичный Метод

public GCD ( BigInteger bi ) : BigInteger
bi BigInteger
Результат BigInteger

GeneratePseudoPrime() публичный статический Метод

public static GeneratePseudoPrime ( int bits ) : BigInteger
bits int
Результат BigInteger

GenerateRandom() публичный статический Метод

Generates a new, random BigInteger of the specified length using the default RNG crypto service provider.
public static GenerateRandom ( int bits ) : BigInteger
bits int The number of bits for the new number.
Результат BigInteger

GenerateRandom() публичный статический Метод

Generates a new, random BigInteger of the specified length.
public static GenerateRandom ( int bits, RandomNumberGenerator rng ) : BigInteger
bits int The number of bits for the new number.
rng System.Security.Cryptography.RandomNumberGenerator A random number generator to use to obtain the bits.
Результат BigInteger

GetBytes() публичный Метод

public GetBytes ( ) : byte[]
Результат byte[]

GetHashCode() публичный Метод

public GetHashCode ( ) : int
Результат int

Incr2() публичный Метод

Increments this by two
public Incr2 ( ) : void
Результат void

IsProbablePrime() публичный Метод

public IsProbablePrime ( ) : bool
Результат bool

LowestSetBit() публичный Метод

public LowestSetBit ( ) : int
Результат int

ModInverse() публичный Метод

public ModInverse ( BigInteger modulus ) : BigInteger
modulus BigInteger
Результат BigInteger

ModPow() публичный Метод

public ModPow ( BigInteger exp, BigInteger n ) : BigInteger
exp BigInteger
n BigInteger
Результат BigInteger

Modulus() публичный статический Метод

public static Modulus ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Результат BigInteger

Modulus() публичный статический Метод

public static Modulus ( BigInteger bi, int i ) : int
bi BigInteger
i int
Результат int

Multiply() публичный статический Метод

public static Multiply ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Результат BigInteger

Multiply() публичный статический Метод

public static Multiply ( BigInteger bi, int i ) : BigInteger
bi BigInteger
i int
Результат BigInteger

NextHighestPrime() публичный статический Метод

Generates the smallest prime >= bi
public static NextHighestPrime ( BigInteger bi ) : BigInteger
bi BigInteger A BigInteger
Результат BigInteger

Parse() публичный статический Метод

public static Parse ( string number ) : BigInteger
number string
Результат BigInteger

Randomize() публичный Метод

Randomizes the bits in "this" from the default RNG.
public Randomize ( ) : void
Результат void

Randomize() публичный Метод

Randomizes the bits in "this" from the specified RNG.
public Randomize ( RandomNumberGenerator rng ) : void
rng System.Security.Cryptography.RandomNumberGenerator A RNG.
Результат void

Subtract() публичный статический Метод

public static Subtract ( BigInteger bi1, BigInteger bi2 ) : BigInteger
bi1 BigInteger
bi2 BigInteger
Результат BigInteger

TestBit() публичный Метод

public TestBit ( int bitNum ) : bool
bitNum int
Результат bool

ToString() публичный Метод

public ToString ( ) : string
Результат string

operator() публичный статический Метод

public static operator ( ) : BigInteger
Результат BigInteger

operator() публичный статический Метод

public static operator ( ) : int
Результат int