Jari-Matti Mäkelä wrote: > Yes, here's the Tom's array logic with some simple template magic (might > not be fully optimized, though): Kiitokset - thanks, that does the trick. One small typo was in the template, however: you use tmp[j][i] where it should say tmp[i][j].