Skip to content

Random Generator and AT elements #879

Answered by lfarv
oscarxblanco asked this question in Q&A
Discussion options

You must be logged in to vote

I'll put things in another way: random generators used in python and C are distinct, and as far as I can see, there is no specific random generator in Matlab, only the Matlab standard ones. The motivation is to avoid having the C engine depending on any external library. The whole implementation is in atrandom.c, and the behaviour is identical when running under python or Matlab. the C generators can be accessed from python but not from Matlab. For element passmethods, the generators which matter are the C generators, and the will work for both Matlab and python. There are 2 streams:

  • the "thread" stream Param->thread_rng will generate different streams in different parallel threads, eith…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@oscarxblanco
Comment options

oscarxblanco Dec 19, 2024
Collaborator Author

@lfarv
Comment options

Answer selected by oscarxblanco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Matlab For Matlab/Octave AT code Python For python AT code C For C code / pass methods
2 participants