petsc-3.9.4 2018-09-11
PetscRandomSetInterval
Sets the interval over which the random numbers will be randomly distributed. By default, this interval is [0,1).
Synopsis
#include "petscsys.h"
PetscErrorCode PetscRandomSetInterval(PetscRandom r,PetscScalar low,PetscScalar high)
Not collective
Input Parameters
| r | - the random number generator context
|
| low | - The lower bound of the interval
|
| high | - The upper bound of the interval
|
Notes: for complex numbers either the real part or the imaginary part of high must be greater than its low part; or both of them can be greater.
If the real or imaginary part of low and high are the same then that value is always returned in the real or imaginary part.
See Also
PetscRandomCreate(), PetscRandomGetInterval()
Level
intermediate
Location
src/sys/classes/random/interface/random.c
Examples
src/sys/classes/random/examples/tutorials/ex1.c.html
src/dm/examples/tutorials/swarm_ex3.c.html
src/ksp/ksp/examples/tutorials/ex11.c.html
src/ksp/ksp/examples/tutorials/ex70.c.html
src/ksp/ksp/examples/tutorials/ex11f.F90.html
src/ts/examples/tutorials/ex42.c.html
src/tao/unconstrained/examples/tutorials/spectraladjointassimilation.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages