C# Class Mono.Math.BigInteger

Afficher le fichier Open project: rackerlabs/openstack-guest-agents-windows-xenserver Class Usage Examples

Méthodes publiques

Свойство Type Description
smallPrimes uint[]

Private Properties

Свойство Type Description
Normalize void
isProbablePrime bool

Méthodes publiques

Méthode Description
BigInteger ( ) : System
BigInteger ( BigInteger bi ) : System
BigInteger ( BigInteger bi, uint len ) : System
BigInteger ( Sign sign, uint len ) : System
BigInteger ( byte inData ) : System
BigInteger ( uint inData ) : System
BigInteger ( ulong ul ) : System
Clear ( ) : void
Compare ( BigInteger bi ) : Sign
Equals ( object o ) : bool
GetHashCode ( ) : int
Incr2 ( ) : void

Increments this by two

LowestSetBit ( ) : int
NextHightestPrime ( BigInteger bi ) : BigInteger

Generates the smallest prime >= bi

Parse ( string number ) : BigInteger
ToString ( ) : string
ToString ( uint radix ) : string
ToString ( uint radix, string charSet ) : string
bitCount ( ) : int
clearBit ( uint bitNum ) : void
gcd ( BigInteger bi ) : BigInteger
genPseudoPrime ( int bits ) : BigInteger
genRandom ( int bits ) : BigInteger

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

genRandom ( int bits, RandomNumberGenerator rng ) : BigInteger

Generates a new, random BigInteger of the specified length.

getBytes ( ) : byte[]
isProbablePrime ( ) : bool
modInverse ( BigInteger mod ) : BigInteger
modPow ( BigInteger exp, BigInteger n ) : BigInteger
operator ( ) : BigInteger
operator ( ) : bool
operator ( ) : int
operator ( ) : uint
randomize ( ) : void

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

randomize ( RandomNumberGenerator rng ) : void

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

setBit ( uint bitNum ) : void
setBit ( uint bitNum, bool val ) : void
testBit ( int bitNum ) : bool
testBit ( uint bitNum ) : bool

Tests if the specified bit is 1.

Private Methods

Méthode Description
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.

isProbablePrime ( int notUsed ) : bool

Method Details

BigInteger() public méthode

public BigInteger ( ) : System
Résultat System

BigInteger() public méthode

public BigInteger ( BigInteger bi ) : System
bi BigInteger
Résultat System

BigInteger() public méthode

public BigInteger ( BigInteger bi, uint len ) : System
bi BigInteger
len uint
Résultat System

BigInteger() public méthode

public BigInteger ( Sign sign, uint len ) : System
sign Sign
len uint
Résultat System

BigInteger() public méthode

public BigInteger ( byte inData ) : System
inData byte
Résultat System

BigInteger() public méthode

public BigInteger ( uint inData ) : System
inData uint
Résultat System

BigInteger() public méthode

public BigInteger ( ulong ul ) : System
ul ulong
Résultat System

Clear() public méthode

public Clear ( ) : void
Résultat void

Compare() public méthode

public Compare ( BigInteger bi ) : Sign
bi BigInteger
Résultat Sign

Equals() public méthode

public Equals ( object o ) : bool
o object
Résultat bool

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

Incr2() public méthode

Increments this by two
public Incr2 ( ) : void
Résultat void

LowestSetBit() public méthode

public LowestSetBit ( ) : int
Résultat int

NextHightestPrime() public static méthode

Generates the smallest prime >= bi
public static NextHightestPrime ( BigInteger bi ) : BigInteger
bi BigInteger A BigInteger
Résultat BigInteger

Parse() public static méthode

public static Parse ( string number ) : BigInteger
number string
Résultat BigInteger

ToString() public méthode

public ToString ( ) : string
Résultat string

ToString() public méthode

public ToString ( uint radix ) : string
radix uint
Résultat string

ToString() public méthode

public ToString ( uint radix, string charSet ) : string
radix uint
charSet string
Résultat string

bitCount() public méthode

public bitCount ( ) : int
Résultat int

clearBit() public méthode

public clearBit ( uint bitNum ) : void
bitNum uint
Résultat void

gcd() public méthode

public gcd ( BigInteger bi ) : BigInteger
bi BigInteger
Résultat BigInteger

genPseudoPrime() public static méthode

public static genPseudoPrime ( int bits ) : BigInteger
bits int
Résultat BigInteger

genRandom() public static méthode

Generates a new, random BigInteger of the specified length using the default RNG crypto service provider.
public static genRandom ( int bits ) : BigInteger
bits int The number of bits for the new number.
Résultat BigInteger

genRandom() public static méthode

Generates a new, random BigInteger of the specified length.
public static genRandom ( 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.
Résultat BigInteger

getBytes() public méthode

public getBytes ( ) : byte[]
Résultat byte[]

isProbablePrime() public méthode

public isProbablePrime ( ) : bool
Résultat bool

modInverse() public méthode

public modInverse ( BigInteger mod ) : BigInteger
mod BigInteger
Résultat BigInteger

modPow() public méthode

public modPow ( BigInteger exp, BigInteger n ) : BigInteger
exp BigInteger
n BigInteger
Résultat BigInteger

operator() public static méthode

public static operator ( ) : BigInteger
Résultat BigInteger

operator() public static méthode

public static operator ( ) : bool
Résultat bool

operator() public static méthode

public static operator ( ) : int
Résultat int

operator() public static méthode

public static operator ( ) : uint
Résultat uint

randomize() public méthode

Randomizes the bits in "this" from the default RNG.
public randomize ( ) : void
Résultat void

randomize() public méthode

Randomizes the bits in "this" from the specified RNG.
public randomize ( RandomNumberGenerator rng ) : void
rng System.Security.Cryptography.RandomNumberGenerator A RNG.
Résultat void

setBit() public méthode

public setBit ( uint bitNum ) : void
bitNum uint
Résultat void

setBit() public méthode

public setBit ( uint bitNum, bool val ) : void
bitNum uint
val bool
Résultat void

testBit() public méthode

public testBit ( int bitNum ) : bool
bitNum int
Résultat bool

testBit() public méthode

Tests if the specified bit is 1.
public testBit ( uint bitNum ) : bool
bitNum uint The bit to test. The least significant bit is 0.
Résultat bool

Property Details

smallPrimes public_oe static_oe property

Table of primes below 2000.

This table was generated using Mathematica 4.1 using the following function:

PrimeTable [x_] := Prime [Range [1, PrimePi [x]]] PrimeTable [6000]

public static uint[] smallPrimes
Résultat uint[]