rindow / rindow-math-matrix

The fundamental package for scientific matrix operation
https://rindow.github.io/mathematics/
BSD 3-Clause "New" or "Revised" License
11 stars 3 forks source link
acceleration array gpu hpc machine-learning mathematics n-dimensional openblas opencl php php8 scientific-computing

The fundamental package for scientific matrix operation

Status: Build Status Downloads Latest Stable Version License

Rindow Math Matrix is the fundamental package for scientific matrix operation

Please see the documents on Rindow mathematics project web pages.

Requirements

Strong recommend

You can perform very fast N-dimensional array operations in conjunction

Please see the rindow-math-matrix-matlibffi to setup plug-in and pre-build binaries.

How to Setup

Set it up using composer.

$ composer require rindow/rindow-math-matrix

You can use it as is, but you will need to speed it up to process at a practical speed.

And then, Set up pre-build binaries for the required high-speed calculation libraries. Click here for details.

$ composer require rindow/rindow-math-matrix-matlibffi

Sample programs

<?php
// sample.php
include __DIR__.'/vendor/autoload.php';
use Rindow\Math\Matrix\MatrixOperator;

$mo = new MatrixOperator();
$a = $mo->array([[1,2],[3,4]]);
$b = $mo->array([[2,3],[4,5]]);
$c = $mo->cross($a,$b);
echo $mo->toString($c,indent:true)."\n";
$ php sample.php
[
 [10,13],
 [22,29]
]