Bug in MCAmericanBasketEngine class

Posted by Toyin Akin on
URL: http://quantlib.414.s1.nabble.com/RE-R-Quantlib-users-Credit-default-pricing-G2-model-tp10904p10906.html

Hi,

Seems to crash if you specify an odd number (ie - 5) for the required sample
size parameter of the constructor.

I've tracked it down to line 445, the crash actually happens on line 458.

Seems like the logic for filling in the array is flawed when an odd number
is specified (greater than 1).

Best Regards,
Toyin Akin.