Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-14 Thread Gary Gregory
+1 to updating RNG to Java 8 Gary On Fri, Jun 14, 2019 at 10:45 AM Alex Herbert wrote: > > On 14/06/2019 13:29, sebb wrote: > > On Fri, 14 Jun 2019 at 12:57, Alex Herbert > wrote: > >> > >> On 14/06/2019 12:01, sebb wrote: > >>> I meant that the iterator would use the shuffled and/or selected

Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-14 Thread Alex Herbert
On 14/06/2019 13:29, sebb wrote: On Fri, 14 Jun 2019 at 12:57, Alex Herbert wrote: On 14/06/2019 12:01, sebb wrote: I meant that the iterator would use the shuffled and/or selected indices to return the appropriate entry from the original array. No need to modify the original array. To shu

Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-14 Thread sebb
On Fri, 14 Jun 2019 at 12:57, Alex Herbert wrote: > > > On 14/06/2019 12:01, sebb wrote: > > I meant that the iterator would use the shuffled and/or selected > > indices to return the appropriate entry from the original array. > > > > No need to modify the original array. > > To shuffle an array r

Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-14 Thread Alex Herbert
On 14/06/2019 12:01, sebb wrote: I meant that the iterator would use the shuffled and/or selected indices to return the appropriate entry from the original array. No need to modify the original array. To shuffle an array requires storage as elements are swapped. Either store an index or sto

Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-14 Thread sebb
I meant that the iterator would use the shuffled and/or selected indices to return the appropriate entry from the original array. No need to modify the original array. On Thu, 13 Jun 2019 at 18:15, Eric Barnhill wrote: > > An iterator that dynamically shuffles as you go along. That's really nic

Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-13 Thread Eric Barnhill
An iterator that dynamically shuffles as you go along. That's really nice, I had never even thought of that. Thanks. On Thu, Jun 13, 2019 at 10:11 AM Alex Herbert wrote: > > On 13/06/2019 17:56, Eric Barnhill wrote: > > On Thu, Jun 13, 2019 at 9:36 AM sebb wrote: > > > >> > >> Rather than shuff

Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-13 Thread Alex Herbert
On 13/06/2019 17:56, Eric Barnhill wrote: On Thu, Jun 13, 2019 at 9:36 AM sebb wrote: Rather than shuffle etc in place, how about various iterators/selectors to return entries in randomised order? [Or does that already exist?] I am pretty sure random draws, and shuffling, are implemented

Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-13 Thread Eric Barnhill
On Thu, Jun 13, 2019 at 9:36 AM sebb wrote: > > > Rather than shuffle etc in place, how about various > iterators/selectors to return entries in randomised order? > [Or does that already exist?] > I am pretty sure random draws, and shuffling, are implemented with different algorithms. Though sam

Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-13 Thread sebb
On Thu, 13 Jun 2019 at 16:35, Alex Herbert wrote: > > > On 13/06/2019 15:59, Gary Gregory wrote: > > Now that RNG is up and going, it seems odd to still have: > > > > org.apache.commons.lang3.ArrayUtils.shuffle(double[], Random) > > > > Should we deprecate these APIs in favor of Commons RNG and if

Re: [lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-13 Thread Alex Herbert
On 13/06/2019 15:59, Gary Gregory wrote: Now that RNG is up and going, it seems odd to still have: org.apache.commons.lang3.ArrayUtils.shuffle(double[], Random) Should we deprecate these APIs in favor of Commons RNG and if so which RNG APIs? Gary Shuffling is in the commons-rng-sampling com

[lang][rng] org.apache.commons.lang3.ArrayUtils.shuffle()

2019-06-13 Thread Gary Gregory
Now that RNG is up and going, it seems odd to still have: org.apache.commons.lang3.ArrayUtils.shuffle(double[], Random) Should we deprecate these APIs in favor of Commons RNG and if so which RNG APIs? Gary