C# 클래스 CasualGodComplex.RandomExtensions

파일 보기 프로젝트 열기: martindevans/CasualGodComplex

공개 메소드들

메소드 설명
NormallyDistributedSingle ( this random, float standardDeviation, float mean ) : float

Generates a single value from a normal distribution, using Box-Muller https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform

NormallyDistributedSingle ( this random, float standardDeviation, float mean, float min, float max ) : float

Generates a single normal value clamped within min and max

Originally used inverse phi method, but this method, found here: http://arxiv.org/pdf/0907.4010.pdf is significantly faster

NormallyDistributedSingles ( this random, float standardDeviation, float mean ) : IEnumerable

Generates a sequence of values from a normal distribution, using Box-Muller https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform

NormallyDistributedSingles ( this random, float standardDeviation, float mean, float min, float max ) : IEnumerable

Generates a sequence of normal values clamped within min and max

Originally used inverse phi method, but this method, found here: http://arxiv.org/pdf/0907.4010.pdf is significantly faster

메소드 상세

NormallyDistributedSingle() 공개 정적인 메소드

Generates a single value from a normal distribution, using Box-Muller https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform
public static NormallyDistributedSingle ( this random, float standardDeviation, float mean ) : float
random this A (uniform) random number generator
standardDeviation float The standard deviation of the distribution
mean float The mean of the distribution
리턴 float

NormallyDistributedSingle() 공개 정적인 메소드

Generates a single normal value clamped within min and max
Originally used inverse phi method, but this method, found here: http://arxiv.org/pdf/0907.4010.pdf is significantly faster
public static NormallyDistributedSingle ( this random, float standardDeviation, float mean, float min, float max ) : float
random this A (uniform) random number generator
standardDeviation float The standard deviation of the distribution
mean float The mean of the distribution
min float The minimum allowed value (does not bias)
max float The max allowed value (does not bias)
리턴 float

NormallyDistributedSingles() 공개 정적인 메소드

Generates a sequence of values from a normal distribution, using Box-Muller https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform
public static NormallyDistributedSingles ( this random, float standardDeviation, float mean ) : IEnumerable
random this A (uniform) random number generator
standardDeviation float The standard deviation of the distribution
mean float The mean of the distribution
리턴 IEnumerable

NormallyDistributedSingles() 공개 정적인 메소드

Generates a sequence of normal values clamped within min and max
Originally used inverse phi method, but this method, found here: http://arxiv.org/pdf/0907.4010.pdf is significantly faster
public static NormallyDistributedSingles ( this random, float standardDeviation, float mean, float min, float max ) : IEnumerable
random this A (uniform) random number generator
standardDeviation float The standard deviation of the distribution
mean float The mean of the distribution
min float The minimum allowed value (does not bias)
max float The max allowed value (does not bias)
리턴 IEnumerable