For details read Perl NOC. After June 25

Oliver Ebenhöh >
Bio-Metabolic-0.07 >
Bio::Metabolic::MatrixOps

- NAME
- SYNOPSIS
- DESCRIPTION
- AUTHOR
- SEE ALSO
- METHODS
- method xrow
- method xcol
- method addrows
- method addcols
- method delcol
- method delcols
- method delrow
- method delrows
- method det # probably obsolete!!!! Check with PDL::Matrix / PDL::MatrixOps
- method is_pos_def
- method row_echelon_int;
- method cutrow
- method cutcol
- method cutrows
- method cutcols
- method permrows
- method kernel
- method invert # probably obsolete!!!! Check with PDL::Matrix / PDL::MatrixOps
- method char_pol
- method to_Hurwitz
- method Hurwitz_crit

Bio::Metabolic::MatrixOps - Operations on PDL::Matrix objects

use Bio::Metabolic::MatrixOps;

This module contains all matrix operations that are needed for calculations involving the stoichiometric matrix

Oliver Ebenhoeh, oliver.ebenhoeh@rz.hu-berlin.de

Bio::Metabolic Bio::Metabolic::Substrate Bio::Metabolic::Substrate::Cluster Bio::Metabolic::Reaction Bio::Metabolic::Network

$m->xrow($r1,$r2); Exchanges rows $r1 and $r2 in matrix $m.

$m->xcol($r1,$r2); Exchanges columns $r1 and $r2 in matrix $m.

$m->addrows($r1,$r2[,$lambda]); Adds $lambda times the $r2-th row to $r1

$m->addcols($c1,$c2[,$lambda]); Adds $lambda times the $c2-th column to $c1

$m->delcol($c); Sets all coefficients in the column $c to zero.

$m->delcols(@c); Sets all coefficients in the columns specified in @c to zero.

$m->delrow($r); Sets all coefficients in the row $r to zero.

$m->delrows(@r); Sets all coefficients in the rows specified in @r to zero.

$det = $m->det; Returns the determinant of matrix $m, undef if $m is not square.

$m->is_pos_def; Returns true if matrix $m is truely positive definite, false otherwise

$row_echelon_matrix = $m->row_echelon_int; ($row_echelon_matrix, $permutation_vector, $rank) = $m->row_echelon_int;

Returns the integer row echelon form of matrix $m. In array context also returns the permutation vector indication how the rows of $m were permuted while calculating the row echelon form and the rank of the matrix $m.

$mnew = $m->cutrow($r); Returns a matrix without row $r, i.e. the number of rows is reduced by one.

$mnew = $m->cutcol($c); Returns a matrix without column $c, i.e. the number of columns is reduced by one.

$mnew = $m->cutrows(@r); Returns a matrix without all rows specified in @r, i.e. the number of rows is reduced by the number of elements in @r.

$mnew = $m->cutcols(@c); Returns a matrix without all columns specified in @c, i.e. the number of columns is reduced by the number of elements in @c.

$mnew = $m->permrows($permutation_vector);

Returns a matrix with the rows permuted as specified by $permutation_vector. $permutation_vector must be a PDL.

EXAMPLE: If $m is a 3x3 matrix, then $p = $m->permrows(pdl [2,0,1]); will return a matrix with the last row of $m as first row, the first row of $m as the second and the second row of $m as the last row.

$ker = $m->kernel; Returns the kernel of matrix $m, i.e. the matrix with linearly independent column vectors $c satisfying the equation $m x $c = 0.

$inv = $m->invert; Returns the inverse of $m, undef if $m is not invertible.

$coefficient_vector = $m->char_pol;

Returns a PDL with the coefficients of the characteristic polynomial of $m.

EXAMPLE: [1 2 1] The matrix M=[2 0 3] has the characeristic polynomial [1 1 1] p(x) = det(M-x1) = a_3 x^3 + a_2 x^2 + a_1 x + a_0 = -x^3+2x^2+7x+1.

$m = mdpl [[1,2,1],[2,0,3],[1,1,1]]; $cp = $m->char_pol; This returns [1,7,2,-1]. $cp->at(n) contains the coefficient a_n.

$hurwitz_matrix = $m->to_Hurwitz;

Returns the Hurwitz matrix. The coefficients of the Hurwitz matrix are defined to be: H_ij = a_{n-2i+j} if 0 < 2i-j <= n, 0 otherwise where a_n are the coefficients of the characteristic polynomial.

if ($m->Hurwitz_crit) { ... }

Returns true if the Hurwitz condition is fulfilled, i.e. if all sub-determinants are larger than zero and a_n/a_0 > 0 for all n >= 1.

syntax highlighting: