pub struct vtkRandomPool(/* private fields */);Expand description
convenience class to quickly generate a pool of random numbers
vtkRandomPool generates random numbers, and can do so using multithreading. It supports parallel applications where generating random numbers on the fly is difficult (i.e., non-deterministic). Also, it can be used to populate vtkDataArrays in an efficient manner. By default it uses an instance of vtkMersenneTwister to generate random sequences, but any subclass of vtkRandomSequence may be used. It also supports simple methods to generate, access, and pass random memory pools between objects.
In threaded applications, these class may be conveniently used to pre-generate a sequence of random numbers, followed by the use of deterministic accessor methods to produce random sequences without problems etc. due to unpredictable work load and order of thread execution.
@warning The class uses vtkMultiThreader if the size of the pool is larger than the specified chunk size. Also, vtkSMPTools may be used to scale the components in the method PopulateDataArray().
Implementations§
Source§impl vtkRandomPool
impl vtkRandomPool
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new vtkRandomPool wrapped inside vtkNew