C# Class Mono.Math.Prime.PrimalityTests

ファイルを表示 Open project: rackerlabs/openstack-guest-agents-windows-xenserver Class Usage Examples

Public Methods

Method Description
RabinMillerTest ( BigInteger bi, ConfidenceFactor confidence ) : bool

Probabilistic prime test based on Rabin-Miller's test

SmallPrimeSppTest ( BigInteger bi, ConfidenceFactor confidence ) : bool

Private Methods

Method Description
GetSPPRounds ( BigInteger bi, ConfidenceFactor confidence ) : int

Method Details

RabinMillerTest() public static method

Probabilistic prime test based on Rabin-Miller's test
public static RabinMillerTest ( BigInteger bi, ConfidenceFactor confidence ) : bool
bi BigInteger /// /// The number to test. /// ///
confidence ConfidenceFactor /// /// The number of chosen bases. The test has at least a /// 1/4^confidence chance of falsely returning True. /// ///
return bool

SmallPrimeSppTest() public static method

public static SmallPrimeSppTest ( BigInteger bi, ConfidenceFactor confidence ) : bool
bi BigInteger
confidence ConfidenceFactor
return bool