I need a PHP library for vectors and matrices. The library I'm looking for should include functions like matrix multiplication, vector cosine similarity, convolution etc.
I also expect such a library to have a proper compact internal representation of sparse vectors and matrices.
I'm using PHP 5.2.
There is
and a number of other related PEAR packages about Math
I do not know if they suit your needs though. See for yourself.
There used to be a PHP4 port of the JAMA matrix library at http://www.phpmath.com but it seems to have disappeared from the site. We use it in PHPExcel (though I've updated it a bit to PHP5)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With