Add public void nextBytes(byte[] bytes, int position, int length) method into the RandomGenerator interface

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Add public void nextBytes(byte[] bytes, int position, int length) method into the RandomGenerator interface

Rostislav Krasny
Hi there,

I propose to add public void nextBytes(byte[] bytes, int position, int
length) method into the base classes that implement the
RandomGenerator interface.

Rationality: to improve performance and memory usage in cases when one
needs to fill only a specified region of a byte array. This will also
allow the users to write a simpler code. Today to do that you need to
allocate a temporary byte array and copy it by yourself into the
specified region of the destination byte array.

Please take a look at the code I've proposed in MATH-1306 Jira ticket:
https://issues.apache.org/jira/browse/MATH-1306

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]