Am 24.10.2017 um 16:45 schrieb Sven Schreiber:
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.
Yes, of course. Guess we should correct this (potential bug) in SB() then.
I _briefly_ looked at his MFE toolbox and there the relevant code
looked
quite different to me.
What do you mean by quite different? The relevant part in
SB() is the
random block length determination and then selection of relevant entries
in the vector. This is, apart from the 'nested/double-uniform draw' we
discussed before, the same as in Stefano's original code.
>> As I said, by using the 'const' declaration most of the copy should
>> be gone I'd hope.
>
> The 'const' declaration does not change (or maybe only marginally)
> computational time in my examples even if the vector has 10000 rows.
Too bad.
>> might save you some function call overhead.
>
> That's a good point. Let me experiment with this.
It might be a useful extension. OTOH I wouldn't expect speed wonders,
either.
Will see ;-)
Artur