Other functions from aGrUM¶
Random functions¶
-
pyAgrum.
initRandom
(unsigned int seed=0)¶ Initialize random generator seed.
Parameters: seed (int) – the seed used to initialize the random generator
-
pyAgrum.
randomProba
()¶ Returns: a random number between 0 and 1 included (i.e. a proba). Return type: double
-
pyAgrum.
randomDistribution
(int n)¶ Parameters: n (int) – The number of modalities for the ditribution. Returns: Return type: a random discrete distribution.
OMP functions¶
-
pyAgrum.
isOMP
()¶ Returns: True if OMP has been set at compilation, False otherwise Return type: bool
-
pyAgrum.
setNumberOfThreads
(unsigned int number)¶ To avoid spare cycles (less then 100% CPU occupied), use more threads than logical processors (x2 is a good all-around value).
Returns: number – the number of threads to be used Return type: int
-
pyAgrum.
getNumberOfLogicalProcessors
()¶ Returns: the number of logical processors Return type: int
-
pyAgrum.
getMaxNumberOfThreads
()¶ Returns: the max number of threads Return type: int