SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Mandrake Other perl-Math-Matrix-0.2-1.i386.rpm

Matrix

Section: User Contributed Perl Documentation (3)
Updated: perl 5.004, patch 04
Index 

NAME

Math::Matrix - Multiply and invert Matrices 

DESCRIPTION

The following methods are available:

new

Constructor arguments are a list of references to arrays of the samelength. The arrays are copied. The method returns undef in case oferror.

        $a = new Math::Matrix ([rand,rand,rand],                                [rand,rand,rand],                                [rand,rand,rand]);

concat

Concatenates two matrices of same row count. The result is a newmatrix or undef in case of error.

        $b = new Math::Matrix ([rand],[rand],[rand]);        $c = $a->concat($b);

transpose

Returns the transposed matrix. This is the matrix where colums androws of the argument matrix are swaped.

multiply

Multiplies two matrices where the length of the rows in the firstmatrix is the same as the length of the columns in the secondmatrix. Returns the product or undef in case of error.

solve

Solves a equation system given by the matrix. The number of columsmust be greater than the number of rows. If variables are dependentfrom each other, the second and all further of the dependentcoefficients are 0. This means the method can handle such systems. Themethod returns a matrix containing the solutions in its columns orundef in case of error.

print

Prints the matrix on STDOUT. If the method has additional parameters,these are printed before the matrix is printed. 

EXAMPLE

        use Math::Matrix;
        srand(time);        $a = new Math::Matrix ([rand,rand,rand],                          [rand,rand,rand],                          [rand,rand,rand]);        $x = new Math::Matrix ([rand,rand,rand]);        $a->print("A\n");        $E = $a->concat($x->transpose);        $E->print("Equation system\n");        $s = $E->solve;        $s->print("Solutions s\n");        $a->multiply($s)->print("A*s\n");
 

AUTHOR

Ulrich Pfeifer <pfeiferAATTls6.informatik.uni-dortmund.de>


 

Index

NAME
DESCRIPTION
EXAMPLE
AUTHOR

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector