|
SOLUTIONS
|
OPENCLLINK 符号
OpenCLMersenneTwister
OpenCLMersenneTwister[n]
generates n random reals using the Mersenne Twister algorithm.
更多信息更多信息
- The OpenCLLink application must be loaded using Needs["OpenCLLink`"].
- The following options can be given:
-
"Device" Automatic device on which OpenCL computation is performed "Platform" Automatic platform on which OpenCL computation is performed "SeedFile" None file containing the initial state of the random number generator "SeedValue" Automatic seed value for the random number generator; a random integer is used if set to Automatic
范例范例打开所有单元关闭所有单元
基本范例 (4)基本范例 (4)
First, load the OpenCLLink application:
| In[1]:= |
This generates 50 random reals:
| In[2]:= |
| Out[2]= | ![]() |
This generates 50 random reals, setting the initial state from a file:
| In[1]:= |
| Out[1]= | ![]() |
This generates 50 random reals, setting the seed value from an integer:
| In[1]:= |
| Out[1]= | ![]() |
This generates 50 random reals, setting the seed value from an integer and the state from a file, returning the same random numbers on each call:
| In[1]:= |
| Out[1]= | ![]() |
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »





