Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: An efficient, scalable matrix transformation algorithm

by Luftkissenboot (Novice)
on Jan 28, 2009 at 14:05 UTC ( [id://739567]=note: print w/replies, xml ) Need Help??


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?

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://739567]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-03-29 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found