Generated by DocFX

Class ConstantGenerator

Dummy random number generator that always generates the same number.

Inheritance
System.Object
ConstantGenerator
Implements
IRandomNumberGenerator<System.Double>
Namespace: ISynergy.Framework.Mathematics.Random
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public sealed class ConstantGenerator : object, IRandomNumberGenerator<double>

Constructors

View Source

ConstantGenerator(Double)

Initializes a new instance of the ConstantGenerator class.

Declaration
public ConstantGenerator(double value)
Parameters
Type Name Description
System.Double value

The constant value to be generated.

Properties

View Source

Value

Gets or sets the constant value returned by this generator.

Declaration
public double Value { get; set; }
Property Value
Type Description
System.Double

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.

Implements

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)