data_structures
[ class tree: data_structures ] [ index: data_structures ] [ all elements ]

Class: Matrix

Source Location: /data_structures/Matrix.class.php

Class Overview




Author(s):

Version:

  • 0.1.0

Copyright:

  • Copyright (C) 2004 Daniel Plücken <daniel@debakel.net>

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Variables

Methods



Class Details

[line 47]


Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.1.0
copyright:  

Copyright (C) 2004 Daniel Plücken <daniel@debakel.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

since:  0.9.1.8
license:  GNU Lesser General Public License


[ Top ]


Class Variables

$dbl_m_arr = array()

[line 69]

The stored matrix data.



Tags:

access:  public

Type:   array


[ Top ]

$int_cols =  0

[line 62]

The number of cols in this matrix.



Tags:

access:  public

Type:   integer


[ Top ]

$int_rows =  0

[line 55]

The number of rows in this matrix.



Tags:

access:  public

Type:   integer


[ Top ]



Class Methods


static method getIdentityMatrix [line 378]

static Matrix getIdentityMatrix( integer $rows_cols)

Returns an object of this class which all elements on the diagonal have the value 1 (one) and the other elements have the value 0 (zero).



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

integer   $rows_cols  

[ Top ]

static method inputArray [line 104]

static boolean inputArray( &$data_arr, array $data_arr)

Uses a arra to generate this matrix.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

array   $data_arr  
   &$data_arr  

[ Top ]

static method multiply [line 336]

static false|Matrix multiply( &$a_obj, &$b_obj, Matrix $a_obj, Matrix $b_obj)

Multiplies two matrices and returns an object of the product matrix.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

Matrix   $a_obj  
Matrix   $b_obj  
   &$a_obj  
   &$b_obj  

[ Top ]

static method summate [line 131]

static false|Matrix summate( &$a_obj, &$b_obj, Matrix $a_obj, Matrix $b_obj)

Summates two matrices and returns an object of the sum matrix.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

Matrix   $a_obj  
Matrix   $b_obj  
   &$a_obj  
   &$b_obj  

[ Top ]

constructor Matrix [line 84]

void Matrix( [integer $rows = 0], [integer $cols = 0])

Constructor



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

integer   $rows  
integer   $cols  

[ Top ]

method addScaledRowToAnother [line 246]

boolean addScaledRowToAnother( double $dbl_factor, integer $int_srow, integer $int_row)

Scales a row virtually and adds it to another given row in this matrix.

The row count begins at 1 (one)! This is an elemantary matrix row operation.




Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

double   $dbl_factor   The scale factor.
integer   $int_srow   Row to scale.
integer   $int_row   Row which the scaled row will add with.

[ Top ]

method convertIntoReducedRowEchelonForm [line 277]

false|Matrix convertIntoReducedRowEchelonForm( Matrix $a_obj, Matrix $b_obj)

Converts this matrix into a reduced row echelon form using the Gaussian elimination.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
todo:  implementing
since:  0.1.0
access:  public


Parameters:

Matrix   $a_obj  
Matrix   $b_obj  

[ Top ]

method scale [line 168]

void scale( double $dbl_factor)

Scales this matrix by the given value.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

double   $dbl_factor  

[ Top ]

method scaleRow [line 215]

boolean scaleRow( double $dbl_factor, integer $int_row)

Scales a row in this matrix. The row count begins at 1 (one)! This is an elemantary matrix row operation.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

double   $dbl_factor  
integer   $int_row  

[ Top ]

method swapRows [line 189]

void swapRows( integer $int_row_a, integer $int_row_b)

Swaps two rows in this matrix. The row count begins at 1 (one)! This is an elemantary matrix row operation.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

integer   $int_row_a  
integer   $int_row_b  

[ Top ]


Documentation generated on Thu, 05 Jun 2008 19:13:44 +0200 by phpDocumentor 1.4.1