Interface for a random number generator. More...
#include <arcane/core/IRandomNumberGenerator.h>
Public Member Functions | |
| virtual bool | initSeed ()=0 |
| Method allowing initialization of the service. | |
| virtual bool | initSeed (ByteArrayView seed)=0 |
| Method allowing initialization of the service. | |
| virtual ByteConstArrayView | viewSeed ()=0 |
| Method allowing retrieval of a constant view of the current seed. | |
| virtual ByteUniqueArray | emptySeed ()=0 |
| Method allowing retrieval of an empty seed of the correct size. | |
| virtual Integer | neededSizeOfSeed ()=0 |
| Method allowing knowledge of the seed size required for the implementation. | |
| virtual bool | isLeapSeedSupported ()=0 |
| Method allowing knowledge if leaps are allowed on the seed generator. | |
| virtual ByteUniqueArray | generateRandomSeed (Integer leap=0)=0 |
| Method allowing generation of a "child" seed from a "parent" seed. | |
| virtual ByteUniqueArray | generateRandomSeed (ByteArrayView parent_seed, Integer leap=0)=0 |
| Method allowing generation of a "child" seed from a "parent" seed. | |
| virtual bool | isLeapNumberSupported ()=0 |
| Method allowing knowledge if leaps are allowed on the number generator. | |
| virtual Real | generateRandomNumber (Integer leap=0)=0 |
| Method allowing generation of a random number using the seed in memory. | |
| virtual Real | generateRandomNumber (ByteArrayView seed, Integer leap=0)=0 |
| Method allowing generation of a random number using the seed passed as a parameter. | |
Interface for a random number generator.
Definition at line 202 of file IRandomNumberGenerator.h.
|
pure virtual |
Method allowing retrieval of an empty seed of the correct size.
Implemented in Arcane::PDESRandomNumberGeneratorService.
|
pure virtual |
Method allowing generation of a random number using the seed passed as a parameter.
This method does not use the seed in memory but the seed provided as a parameter. If the seed provided as a parameter does not have the correct size, an error will be raised.
| seed | The seed. |
| leap | The leap to perform (0 = number n+1+0 / 1 = number n+1+1). |
Implemented in Arcane::PDESRandomNumberGeneratorService.
Method allowing generation of a random number using the seed in memory.
| leap | The leap to perform (0 = number n+1+0 / 1 = number n+1+1). |
Implemented in Arcane::PDESRandomNumberGeneratorService.
|
pure virtual |
Method allowing generation of a "child" seed from a "parent" seed.
This method does not use the seed in memory but the seed provided as a parameter. If the seed provided as a parameter does not have the correct size, an error will be raised.
| parent_seed | The "parent" seed. |
| leap | The leap to perform (0 = seed n+1+0 / 1 = seed n+1+1). |
Implemented in Arcane::PDESRandomNumberGeneratorService.
|
pure virtual |
Method allowing generation of a "child" seed from a "parent" seed.
| leap | The leap to perform (0 = seed n+1+0 / 1 = seed n+1+1). |
Implemented in Arcane::PDESRandomNumberGeneratorService.
|
pure virtual |
Method allowing initialization of the service.
With the seed optional (or the default seed if in singleton mode).
Implemented in Arcane::PDESRandomNumberGeneratorService.
|
pure virtual |
Method allowing initialization of the service.
If the seed does not have the correct size, false will be returned.
| seed | The original seed. |
Implemented in Arcane::PDESRandomNumberGeneratorService.
|
pure virtual |
Method allowing knowledge if leaps are allowed on the number generator.
Implemented in Arcane::PDESRandomNumberGeneratorService.
|
pure virtual |
Method allowing knowledge if leaps are allowed on the seed generator.
Implemented in Arcane::PDESRandomNumberGeneratorService.
|
pure virtual |
Method allowing knowledge of the seed size required for the implementation.
Implemented in Arcane::PDESRandomNumberGeneratorService.
|
pure virtual |
Method allowing retrieval of a constant view of the current seed.
Implemented in Arcane::PDESRandomNumberGeneratorService.