|
|
| XP is just a number | |
| PerlMonks |
Re^2: calculate average in sliding windowsby Eliya (Priest) |
| on May 23, 2012 at 14:27 UTC ( #972045=note: print w/ replies, xml ) | Need Help?? |
|
but it doesn't take into account the positions in column 1 Sorry, I'm still not sure what you want (and it's a little diffficult to infer it from code which - as you state - doesn't work). Are you saying the positions in column 1 are meant to represent indices in some sparse array, with all unspecified positions (such as 12498249..12512574, etc.) implicitly having a value of zero, or what? I think it would help if you could come up with some simplified (but sufficient/complete) sample input (say using a window size of 3) together with the desired output values.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||