Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Obtaining terms in an expansion

by educated_foo (Vicar)
on Jan 06, 2006 at 00:01 UTC ( #521391=note: print w/replies, xml ) Need Help??


in reply to Obtaining terms in an expansion

So you want to compute an outer product? For two 1-dimensional terms (i.e. vectors) you have:
[a1...an]' * [b1...bn] = [a1*b1 ... a1*bn; ...; an*b1 ... an*bn]
which can be written "a_i * b_j" using physicists' tensor notation. For two 2-dimensional terms (i.e. matrices) you have a tensor product like "a_ij * b_kl", and you can generalize this to any rank (and to other operations besides "*"). I think PDL can compute outer products for low ranks, but you'll probably need to create an iterator or some such to avoid running out of memory with higher ranks.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2021-05-14 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (146 votes). Check out past polls.

    Notices?