PHP Classes

Basic improvements from the previous class. - Matrix new package blog

Recommend this page to a friend!
  All package blogs All package blogs   Matrix new Matrix new   Blog Matrix new package blog   RSS 1.0 feed RSS 2.0 feed   Blog Basic improvements fr...  
  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author:

Package: Matrix new

Read the title. :)




Loaded Article
A class for operations on matrices
Creation date: 30/sept/2005
Diego Carrera - Kleber BaŇo
Guayaquil - Ecuador (Spanish version)

Modified : 10/Nov/2009
Pier-André Bouchard St-Amant pabsta [at] econ.queensu.ca
Kingston - Canada
- Changes :
1) (Almost) all function specs so that inputs are matrix objects.
2) Deletion of five functions (including some "statistical" ones) and two global variables
3) Introduction of nine new "basic" functions
- get_data, get_value, set_value, get_columns, get_rows, set_columns, set_rows, delete_columns, delete_rows
- print_matrix (mostly for debugging purpose, as it prints a <table>)
4) Introduction of eleven new mathematical functions :
- point to point product and division.
- eye (identity matrix), ones (matrix of ones), zeros (matrix of zeros) and random matrix "quasi-constructors"
- max, min of a column
- point to point greater than, greater or equal than, smaller than, smaller or equal, equal
5) Correction of numerous bugs.
6) Translation of spanish to english, identation and uniformisation of the function names

- Comments :
a) All mathematical functions are written to ressemble paper algebra :
- AxB ==> $A->times($B);
- A-B ==> $A->minus($B);
- A^(-1) ==> $A->inv();
- A' ==> $A->prime();
- det(A) ==> $A->det($A);
- etc.
This restricts nested calls, but augment readability.
b) The algorithm for matrix inversion is based on Cramer's rule. The algorithm may however not perform well for quasi-colinear matrices or for large matrices.
c) Error messages are echoed to the standard output (likely to be your webpage)
d) I can't wait for operator overloading/definition in PHP !!!



You need to be a registered user or login to post a comment

Login Immediately with your account on:



Comments:

No comments were submitted yet.



  Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  
  All package blogs All package blogs   Matrix new Matrix new   Blog Matrix new package blog   RSS 1.0 feed RSS 2.0 feed   Blog Basic improvements fr...