On Tue, 24 Oct 2017, Sven Schreiber wrote:
Am 24.10.2017 um 15:55 schrieb Artur Tarassow:
> Am 24.10.2017 um 15:38 schrieb Sven Schreiber:
>> [moving this to devel now]
>>
>> Am 24.10.2017 um 15:13 schrieb Artur Tarassow:
>>> Am 24.10.2017 um 14:36 schrieb Sven Schreiber:
>>
>>>> Because each call to randgen1() should be giving you a new random
>>>> number, if you know what I mean. In the original code (now in SBslow())
>>>> this looks different.
>>>
>>> Good point, Sven. I was also thinking about the purpose for the 2nd draw.
>>> It's actually taken from K. Sheppard's code.
>>
>> Please show us. From a quick look at what he has online it didn't seem to
>> me that way.
>
> Please look at slide 34:
>
https://www.kevinsheppard.com/images/6/64/AFE_Week_1_handout.pdf
Yes, well, but it's an old handout, and is that actually used in his current
production code? Those people make mistakes, too, you know.
I'm sure Sheppard is right (and so Artur's SB is also right). If you
used a single random value for both (i) the decision on whether to
start a new block or select a consecutive value and (ii) to select the
starting point for a new block, then your blocks would always start in
the initial 1/b fraction of the data (where b = expected block size).
And surely you don't want that.
Allin