in reply to An efficient, scalable matrix transformation algorithm
From your description what you need to do is:
A1 = F1(a1, a2, a3, ...., an) B1 = F2(b1, b2, b3, ...., bn) C1 = F3(c1, c2, c3, ...., cn)on the face of it, that doesn't appear to be O(n^2). You transpose the original matrix so that (a1, a2, ...) etc. are Perl arrays, presumably for the convenience of F1 etc. -- which seems reasonable, though the work to pull a column into a row seems about the same as processing the column directly (unless elements are accessed more than once by the respective Fn.
I assume the issue here is scale. But I regret this humble engineer is struggling to understand where to look for improvement. (Assuming a multi-core processor I can see that processing columns in parallel makes sense -- especially if the original matrix were in shared memory !) You don't say where the matrix comes from... I wonder if it's possible to transpose it as it's read in ?
So... can you post some code ? Preferrably reduced to show the key logic... and give some idea of the true scale ?
Of course, the general advice is to profile what you have, to identify where the time is really being spent.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: An efficient, scalable matrix transformation algorithm
by Luftkissenboot (Novice) on Jan 28, 2009 at 11:58 UTC | |
by dHarry (Abbot) on Jan 28, 2009 at 13:42 UTC | |
by Luftkissenboot (Novice) on Jan 28, 2009 at 14:05 UTC | |
by dHarry (Abbot) on Jan 28, 2009 at 14:46 UTC | |
by gone2015 (Deacon) on Jan 28, 2009 at 14:20 UTC | |
by gone2015 (Deacon) on Jan 28, 2009 at 18:05 UTC | |
by Luftkissenboot (Novice) on Jan 29, 2009 at 07:37 UTC | |
by Luftkissenboot (Novice) on Jan 28, 2009 at 15:21 UTC |