in reply to Re^3: An efficient, scalable matrix transformation algorithm
in thread An efficient, scalable matrix transformation algorithm

Well, this source is the degenerate case where the objects holding the records are turned into simple arrayrefs, to illustrate the algorithm. I'm willing and able to refactor, though, of course.

The transposition happens because the reductions need to be applied to columns, and the functions sum(), avg(), etc. operate on lists. The only alternative to the full transposition I can see would be a column splice -> list/array, which essentially results in the same thing.

i.e. I don't see a way to avoid the transposition, one way or another ... ? Maybe it's me that's missing something?

  • Comment on Re^4: An efficient, scalable matrix transformation algorithm

Replies are listed 'Best First'.
Re^5: An efficient, scalable matrix transformation algorithm
by dHarry (Abbot) on Jan 28, 2009 at 14:46 UTC

    It was the following text that triggered me (again from the Wiki):

    On a computer, one can often avoid explicitly transposing a matrix in memory by simply accessing the same data in a different order...

    Because your reduction functions are simple (not like some Fourier transformation) I thought you might get away with this. You could also consider to change your data structure.