in reply to Re^2: Problem with Statistics::Burst
in thread Problem with Statistics::Burst

Warning: I'm not a user of Statistics::Burst, nor an expert on the algorithm.

From what I can tell by reading the source, it barfs because it passes 0 (or undef) to $obj->transistion() (sic). The reason for that, I think, is that it kicks off the calculation with $self->calcCost(11);. That hard-coded 11 is used to index into your @gap_space, so if you don't have at least 12 data points, it will fail.

There isn't a lot of code in that module, so I suggest you patch it up and create an RT ticket. It can use some attention.

update: I tried it with some random input, and because of that hard-coded 11, $obj->getStatesUsed(); will only ever return 12 states. IMHO you'd be better off just re-implementing the algorithm yourself.