Generated by DocFX

Class ZigguratUniformOneGenerator

Uniform random number generator using the Ziggurat method.

Inheritance
System.Object
ZigguratUniformOneGenerator
Implements
IRandomNumberGenerator<System.Double>
IRandomNumberGenerator<System.Int32>
IRandomNumberGenerator<System.UInt32>
Namespace: ISynergy.Framework.Mathematics.Random
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public sealed class ZigguratUniformOneGenerator : object, IRandomNumberGenerator<double>, IRandomNumberGenerator<int>, IRandomNumberGenerator<uint>
Remarks

References:

  • John Burkard, Ziggurat Random Number Generator (RNG). Available on: http://people.sc.fsu.edu/~jburkardt/c_src/ziggurat/ziggurat.c (LGPL)
  • Philip Leong, Guanglie Zhang, Dong-U Lee, Wayne Luk, John Villasenor, A comment on the implementation of the ziggurat method, Journal of Statistical Software, Volume 12, Number 7, February 2005.
  • George Marsaglia, Wai Wan Tsang, The Ziggurat _method for Generating Random Variables, Journal of Statistical Software, Volume 5, Number 8, October 2000, seven pages.

Constructors

View Source

ZigguratUniformOneGenerator()

Initializes a new instance of the ZigguratExponentialGenerator class.

Declaration
public ZigguratUniformOneGenerator()
View Source

ZigguratUniformOneGenerator(Int32)

Initializes a new instance of the ZigguratUniformOneGenerator class.

Declaration
public ZigguratUniformOneGenerator(int seed)
Parameters
Type Name Description
System.Int32 seed

The random seed to use. Default is to use the next value from the the framework-wide random generator.

Methods

View Source

Generate()

Generates a random vector of observations from the current distribution.

Declaration
public double Generate()
Returns
Type Description
System.Double

A random vector of observations drawn from this distribution.

View Source

Generate(Int32)

Generates a random vector of observations from the current distribution.

Declaration
public double[] Generate(int samples)
Parameters
Type Name Description
System.Int32 samples

The number of samples to generate.

Returns
Type Description
System.Double[]

A random vector of observations drawn from this distribution.

View Source

Generate(Int32, Double[])

Generates a random vector of observations from the current distribution.

Declaration
public double[] Generate(int samples, double[] result)
Parameters
Type Name Description
System.Int32 samples

The number of samples to generate.

System.Double[] result

The location where to store the samples.

Returns
Type Description
System.Double[]

A random vector of observations drawn from this distribution.

View Source

Generate(Int32, Int32[])

Generates a random vector of observations from the current distribution.

Declaration
public int[] Generate(int samples, int[] result)
Parameters
Type Name Description
System.Int32 samples

The number of samples to generate.

System.Int32[] result

The location where to store the samples.

Returns
Type Description
System.Int32[]

A random vector of observations drawn from this distribution.

View Source

Generate(Int32, UInt32[])

Generates a random vector of observations from the current distribution.

Declaration
public uint[] Generate(int samples, uint[] result)
Parameters
Type Name Description
System.Int32 samples

The number of samples to generate.

System.UInt32[] result

The location where to store the samples.

Returns
Type Description
System.UInt32[]

A random vector of observations drawn from this distribution.

View Source

Next()

Generates a new non-negative integer random number.

Declaration
public uint Next()
Returns
Type Description
System.UInt32

Explicit Interface Implementations

View Source

IRandomNumberGenerator<Int32>.Generate()

Declaration
int IRandomNumberGenerator<int>.Generate()
Returns
Type Description
System.Int32
View Source

IRandomNumberGenerator<Int32>.Generate(Int32)

Declaration
int[] IRandomNumberGenerator<int>.Generate(int samples)
Parameters
Type Name Description
System.Int32 samples
Returns
Type Description
System.Int32[]
View Source

IRandomNumberGenerator<UInt32>.Generate()

Declaration
uint IRandomNumberGenerator<uint>.Generate()
Returns
Type Description
System.UInt32
View Source

IRandomNumberGenerator<UInt32>.Generate(Int32)

Declaration
uint[] IRandomNumberGenerator<uint>.Generate(int samples)
Parameters
Type Name Description
System.Int32 samples
Returns
Type Description
System.UInt32[]

Implements

IRandomNumberGenerator<T>
IRandomNumberGenerator<T>
IRandomNumberGenerator<T>

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)