Open prasunanand opened 5 years ago
@prasunanand could you please explain this feature and some guidelines how to implement it.
Please take a look at different generators in numpy code base.
http://www.netlib.org/lapack/explore-html/df/dd1/group___o_t_h_e_rauxiliary_ga77e05a87ced667cbdb502aa87c72d056.html https://github.com/numpy/numpy/tree/master/numpy/random
Describe an approach how you will implement it ?
The random module in NumPy has random generators such as random.uniform for uniform distribution, random.randn for normal distribution, and also range based pseudo-random generators.
What I am thinking is of a nested class in NumRuby that will bind to the native C functions for the various random generators. We also need to consider various data types we need to support for example bool, int, and float. For this, we can have overloaded functions, for distributions, I need to study how to create uniform/normal distributions in C.
class Random
-> uniform(n, interval) => [ ...n ]
-> normal(n, mean, sd) => [ ...n ]
-> in_range(min, max) => n in [min, max)
etc
@prasunanand I am getting an error when I try to call LAPACK_dlarnv subroutine ( undefined reference to dlarnv ) Is there any specific way to call these functions in our ext folder?
Implement Random Engine generators