C# 클래스 RazorDB.C5.C5Random

A modern random number generator based on G. Marsaglia: Seeds for Random Number Generators, Communications of the ACM 46, 5 (May 2003) 90-93; and a posting by Marsaglia to comp.lang.c on 2003-04-03.
상속: System.Random
파일 보기 프로젝트 열기: gnoso/razordb

공개 메소드들

메소드 설명
C5Random ( ) : System

Create a random number generator seed by system time.

C5Random ( long seed ) : System

Create a random number generator with a given seed

C5Random ( uint Q ) : System

Create a random number generator with a specified internal start state.

Next ( ) : int

Get a new random System.Int32 value

Next ( int max ) : int

Get a random non-negative integer less than a given upper bound

Next ( int min, int max ) : int

Get a random integer between two given bounds

NextBytes ( byte buffer ) : void

Fill a array of byte with random bytes

NextDouble ( ) : double

Get a new random System.Double value

보호된 메소드들

메소드 설명
Sample ( ) : double

Get a new random System.Double value

비공개 메소드들

메소드 설명
Cmwc ( ) : uint

메소드 상세

C5Random() 공개 메소드

Create a random number generator seed by system time.
public C5Random ( ) : System
리턴 System

C5Random() 공개 메소드

Create a random number generator with a given seed
If seed is zero
public C5Random ( long seed ) : System
seed long The seed
리턴 System

C5Random() 공개 메소드

Create a random number generator with a specified internal start state.
If Q is not of length exactly 16
public C5Random ( uint Q ) : System
Q uint The start state. Must be a collection of random bits given by an array of exactly 16 uints.
리턴 System

Next() 공개 메소드

Get a new random System.Int32 value
public Next ( ) : int
리턴 int

Next() 공개 메소드

Get a random non-negative integer less than a given upper bound
If max is negative
public Next ( int max ) : int
max int The upper bound (exclusive)
리턴 int

Next() 공개 메소드

Get a random integer between two given bounds
If max is less than min
public Next ( int min, int max ) : int
min int The lower bound (inclusive)
max int The upper bound (exclusive)
리턴 int

NextBytes() 공개 메소드

Fill a array of byte with random bytes
public NextBytes ( byte buffer ) : void
buffer byte The array to fill
리턴 void

NextDouble() 공개 메소드

Get a new random System.Double value
public NextDouble ( ) : double
리턴 double

Sample() 보호된 메소드

Get a new random System.Double value
protected Sample ( ) : double
리턴 double