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

Kronecker Product

by choroba (Cardinal)
on Jun 21, 2022 at 05:45 UTC ( [id://11144888]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    A = [ 1 2 ]
        [ 3 4 ]
    ...
            [  7  8 14 16 ]
            [ 15 18 20 24 ]
            [ 21 24 28 32 ]
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
        }
        return $kron;
    }
    
  3. or download this
    [ 1 2 ]
    [ 3 4 ]
    
  4. or download this
    [ 1 1 ]   [ 2 2 ]
    [ 1 1 ]   [ 2 2 ]
    
    [ 3 3 ]   [ 4 4 ]
    [ 3 3 ]   [ 4 4 ]
    
  5. or download this
    [  5  6 ] [ 10 12 ]
    [  7  8 ] [ 14 16 ]
    
    [ 15 18 ] [ 20 24 ]
    [ 21 24 ] [ 28 32 ]
    
  6. or download this
    sub kronecker_product {
        my ($x, $y) = @_;
    ...
            $y * $x->dummy(0, $y0)->dummy(1, $y1)
        )->xchg(1, 2)->reshape($x0 * $y0, $x1 * $y1)
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11144888]
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-19 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found