RandomSamplingExtensions.Fill Method

Definition

Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.3.0

Overload List

Fill(IRandomSource, Vector<Double>, ContinuousDistribution) Fills a vector with random samples from the specified continuous distribution.
Fill(IRandomSource, Span<Double>, ContinuousDistribution) Fills a span with random samples from the specified continuous distribution.
Fill(IRandomSource, Span<Int32>, DiscreteDistribution) Fills a span with random samples from the specified discrete distribution.
Fill(Random, Vector<Double>, ContinuousDistribution) Fills a vector with random samples from the specified continuous distribution.
Fill(Random, Span<Double>, ContinuousDistribution) Fills a span with random samples from the specified continuous distribution.
Fill(Random, Span<Int32>, DiscreteDistribution) Fills a span with random samples from the specified discrete distribution.
Fill<TGenerator>(IRandomSource<TGenerator>, Vector<Double>, ContinuousDistribution) Fills a vector with random samples from the specified continuous distribution.
Fill<TGenerator>(IRandomSource<TGenerator>, Vector<Int32>, DiscreteDistribution) Fills a vector with random samples from the specified continuous distribution.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Double>, ContinuousDistribution) Fills a span with random samples from the specified continuous distribution.
Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int32>, DiscreteDistribution) Fills a span with random samples from the specified discrete distribution.

Fill(IRandomSource, Vector<Double>, ContinuousDistribution)

Fills a vector with random samples from the specified continuous distribution.
C#
public static void Fill(
	this IRandomSource random,
	Vector<double> destination,
	ContinuousDistribution distribution
)

Parameters

random  IRandomSource
 
destination  Vector<Double>
The vector to fill with samples.
distribution  ContinuousDistribution
The probability distribution to sample from.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Double>, ContinuousDistribution)

Fills a span with random samples from the specified continuous distribution.
C#
public static void Fill(
	this IRandomSource random,
	Span<double> destination,
	ContinuousDistribution distribution
)

Parameters

random  IRandomSource
 
destination  Span<Double>
The span to fill with samples.
distribution  ContinuousDistribution
The probability distribution to sample from.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(IRandomSource, Span<Int32>, DiscreteDistribution)

Fills a span with random samples from the specified discrete distribution.
C#
public static void Fill(
	this IRandomSource random,
	Span<int> destination,
	DiscreteDistribution distribution
)

Parameters

random  IRandomSource
 
destination  Span<Int32>
The span to fill with samples.
distribution  DiscreteDistribution
The probability distribution to sample from.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Vector<Double>, ContinuousDistribution)

Fills a vector with random samples from the specified continuous distribution.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> random,
	Vector<double> destination,
	ContinuousDistribution distribution
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

random  IRandomSource<TGenerator>
 
destination  Vector<Double>
The vector to fill with samples.
distribution  ContinuousDistribution
The probability distribution to sample from.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Vector<Int32>, DiscreteDistribution)

Fills a vector with random samples from the specified continuous distribution.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> random,
	Vector<int> destination,
	DiscreteDistribution distribution
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

random  IRandomSource<TGenerator>
 
destination  Vector<Int32>
The vector to fill with samples.
distribution  DiscreteDistribution
The probability distribution to sample from.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Double>, ContinuousDistribution)

Fills a span with random samples from the specified continuous distribution.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> random,
	Span<double> destination,
	ContinuousDistribution distribution
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

random  IRandomSource<TGenerator>
 
destination  Span<Double>
The span to fill with samples.
distribution  ContinuousDistribution
The probability distribution to sample from.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill<TGenerator>(IRandomSource<TGenerator>, Span<Int32>, DiscreteDistribution)

Fills a span with random samples from the specified discrete distribution.
C#
public static void Fill<TGenerator>(
	this IRandomSource<TGenerator> random,
	Span<int> destination,
	DiscreteDistribution distribution
)
where TGenerator : struct, new(), IRandomGenerator

Parameters

random  IRandomSource<TGenerator>
 
destination  Span<Int32>
The span to fill with samples.
distribution  DiscreteDistribution
The probability distribution to sample from.

Type Parameters

TGenerator

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IRandomSource<TGenerator>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(Random, Vector<Double>, ContinuousDistribution)

Fills a vector with random samples from the specified continuous distribution.
C#
public static void Fill(
	this Random random,
	Vector<double> destination,
	ContinuousDistribution distribution
)

Parameters

random  Random
 
destination  Vector<Double>
The vector to fill with samples.
distribution  ContinuousDistribution
The probability distribution to sample from.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(Random, Span<Double>, ContinuousDistribution)

Fills a span with random samples from the specified continuous distribution.
C#
public static void Fill(
	this Random random,
	Span<double> destination,
	ContinuousDistribution distribution
)

Parameters

random  Random
 
destination  Span<Double>
The span to fill with samples.
distribution  ContinuousDistribution
The probability distribution to sample from.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Fill(Random, Span<Int32>, DiscreteDistribution)

Fills a span with random samples from the specified discrete distribution.
C#
public static void Fill(
	this Random random,
	Span<int> destination,
	DiscreteDistribution distribution
)

Parameters

random  Random
 
destination  Span<Int32>
The span to fill with samples.
distribution  DiscreteDistribution
The probability distribution to sample from.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Random. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also