Uses the given random number stream to fill the given array of
integers with random values.
Namespace:
CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 5.1.0.0
Syntax
| C# |
|---|
public void Fill( RandomNumberStream stream, double[] v, int start, int n ) |
| Visual Basic (Declaration) |
|---|
Public Sub Fill ( _ stream As RandomNumberStream, _ v As Double(), _ start As Integer, _ n As Integer _ ) |
| Visual C++ |
|---|
public: virtual void Fill( RandomNumberStream^ stream, array<double>^ v, int start, int n ) sealed |
Parameters
- stream
- Type: CenterSpace.NMath.Core..::.RandomNumberStream
Random number stream.
- v
- Type: array<
System..::.Double
>[]()[]
Vector to fill.
- start
- Type: System..::.Int32
Index at which to start placing random deviates.
- n
- Type: System..::.Int32
Number of random deviates to produce.
Implements
IRandomNumberDistribution<(Of <(T>)>)..::.Fill(RandomNumberStream, array<T>[]()[], Int32, Int32)
Remarks
v must be initialized before calling this method.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if n + start exceeds the length of the given array. |