PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Math » Math_Matrix » Bug #5438

transposing not square matrices

Details

Request #5438transposing not square matrices
Submitted2005-09-17 03:11 UTC
Fromtiedtke at gmai dot com
StatusBogus
PackageMath_Matrix
PHP Version4.4.1
OSWin/Linux
Roadmaps(Not assigned)

Comments

[2005-09-17 03:11 UTC] tiedtke at gmai dot com

Description:
------------
A change that would be interesting in the method transpose (line 661), is the possibility of if transposing not square matrices, with little change in the implementation of the method. Another suggestion is in the method "multiply" (line 1156), where it could receive a parameter from a scalar number to multiply for the entire matrix, it follows some examples

Test script:
---------------
Transpose a matrix non square:

function TransposeMatrix ( $m ) {
list($n_lin, $n_col) = $m->getSize();
$tmp = buildMatrix($n_col, $n_lin);
for( $i = 0 ; $i < $n_lin ; $i++)
for( $j = 0 ; $j < $n_col ; $j++)
$tmp->setElement( $j, $i, $m->getElement( $i, $j) );
return $tmp;
}

[2005-09-17 03:13 UTC] tiedtke at gmai dot com

multiply by a scalar number, sorry, i don't see the method scale, disrespect this citation