in reply to Math::Matrix anyone?

You do realize that you have full access to the source code, right?

sub cross_product { my $vectors = shift; my $class = ref($vectors); my $dimensions = @{$vectors->[0]}; return undef unless $dimensions == @$vectors + 1;

indicates that cross_product() expects to receive a single (blessed) matrix that contains the vectors to be productizedmultiplied.

I'm not saying that this access excuses unclear documentation, of course. But I suspect you can use the source to answer your own questions faster then you'll get answers from someone else. Producing a patch for the module might be a good result of your investigation.

- tye        

Replies are listed 'Best First'.
Re^2: Math::Matrix anyone? (source)
by GeoBoater (Initiate) on Aug 02, 2006 at 21:21 UTC
    I know, I know. I gave the source code a quick look, didn't quite understand all of what it was doing (being a lowly noobie perl programmer) and begged for help here. Maybe if I have time I'll go back and play around with it.

    Thanks.

    Ryan
Re^2: Math::Matrix anyone? (source)
by Anonymous Monk on Oct 05, 2007 at 04:23 UTC
    The comment by tye translates into the syntax for your example:
    $a = new Math::Matrix ([1], [2], [3]); $x = new Math::Matrix ([4], [5], [6]); $f=new Math::Matrix([1, 2, 3],[4, 5, 6]); $f=$f->cross_product;
    Kind of a bizarre syntax. Thanks for everyone who's posted here for helping me put the pieces together to sort this out. I don't know how to write a patch, or I would do so...