Пример #1
0
 /// <summary>
 ///     Returns a new instance of <see cref="NumPyRandom"/>.
 /// </summary>
 public NumPyRandom RandomState(NativeRandomState state)
 {
     return(new NumPyRandom(state));
 }
Пример #2
0
 /// <summary>
 ///     Set the internal state of the generator from a <see cref="NumPyRandom"/>.
 ///     for use if one has reason to manually (re-)set the internal state of the pseudo-random number generating algorithm.
 /// </summary>
 /// <param name="nativeRandomState">The state to restore onto this <see cref="NumPyRandom"/></param>
 public void set_state(NativeRandomState nativeRandomState)
 {
     randomizer = nativeRandomState.Restore();
 }
Пример #3
0
 protected internal NumPyRandom(NativeRandomState nativeRandomState)
 {
     set_state(nativeRandomState);
 }