stsievert / swix

Swift Matrix Library
http://docs.stsievert.com/swix/
MIT License
593 stars 54 forks source link

Seeding random variables #14

Closed srambhatla closed 9 years ago

srambhatla commented 9 years ago

Random numbers currently have a fixed seed. Would be nice to have a command to control it. For e.g. MATLAB has rng for this.

stsievert commented 9 years ago

Closed.

A new global variable was defined in numbers.swift called SWIX_SEED. The call to LAPACK's dlarv updates the seed each time (the reason this fix wasn't as simple as I thought).