How to do PHP Matrix Operations in an easy/efficient way How to do PHP Matrix Operations in an easy/efficient way php php

How to do PHP Matrix Operations in an easy/efficient way


Take a look at http://projects.moongate.ro/octave-daemon/

Some of the features that may reduce overhead and convince the IT team:

  • The daemon is accessible via network, which means you can move all Octave processes on a separate server, should you decide you need to

  • Octave processes are persistent, which means that: any data that has been loaded or computed in the past will still be available for newly-connected clients

  • startup times for new Octave processes don't affect clients.

  • Provides conversions between Octave matrices and PHP arrays.


I'm answering my own question about a year later.

We went for another option, we coded our own small library in C++ and we compiled it and added it to php as an extension. This produced the best performance and the code kept being pretty.

$inverted = my_matrix_invert($matrixArray);

People looking to do this kind of things should look here: http://www.php-cpp.com