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

 All package blogs Matrix new Matrix new package blog Basic improvements fr...

Author:

Package: Matrix new

A class for operations on matrices
Creation date: 30/sept/2005
Diego Carrera - Kleber BaŇo

Modified : 10/Nov/2009
Pier-André Bouchard St-Amant pabsta [at] econ.queensu.ca
- 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

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)

1,592,742 PHP developers registered to the PHP Classes site. Be One of Us!

 Facebook Gmail Hotmail StackOverflow GitHub Yahoo

For more information send a message to `info at phpclasses dot org`.