Backends/SiaNet.Backend.Torch/TypeGeneration.cs
/// <summary>
///  Populates the tensor with random values from 0 to max, using the provided random source generator.
/// </summary>
/// <param name="source">The random generator source</param>
/// <param name="max">The upper limit for the values to be generated</param>
Populates the tensor with random values from 0 to max, using the provided random source generator.
Populates the tensor with random values from 0 to max using the provided random source generator .
public void CappedRandom (RandomGenerator source, long max)
        {
            if (source == null)
                throw new ArgumentNullException (nameof (source));
            THByteTensor_cappedRandom (handle, source.handle, max);
        }
public void CappedRandom ( RandomGenerator source , long max ) { if ( source == null ) throw new ArgumentNullException ( nameof ( source ) ) ; THByteTensor_cappedRandom ( handle , source . handle , max ) ; }
Populates the tensor with random values from 0 to max, using the provided random source generator.
Populates the tensor with random values from 0 to max using the provided random source generator .
source
RandomGenerator
The random generator source
The random generator source
max
long
The upper limit for the values to be generated
The upper limit for the values to be generated