PHP bindings for Armadillo.
This repository has been archived on 2020-06-07. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
CismonX b89fc78664 update .travis.yml 2020-06-08 01:19:39 +08:00
src add `isZero()` 2020-03-19 15:32:33 +08:00
stubs Add stub for `isZero`. 2020-03-21 23:51:13 +08:00
tests rename tests 2019-10-08 23:56:05 +08:00
.gitattributes update configuration files 2019-07-29 00:29:44 +08:00
.gitignore Add PCH support for faster building. 2019-09-24 18:41:37 +08:00
.travis.yml update .travis.yml 2020-06-08 01:19:39 +08:00
EXPERIMENTAL update 2019-03-17 11:30:03 +08:00
LICENSE update 2019-02-05 21:31:16 +08:00 integrating Codecov 2020-03-25 03:56:21 +08:00
config.m4 Update Armadillo version; Better detection of clang; Add some preprocessor directives. 2019-10-05 23:16:48 +08:00


Travis-CI Codecov MIT license

PHP bindings for Armadillo.

1. Introduction

This extension aims at providing a high-performance and easy-to-use native linear algebra library for PHP, which contains PHP bindings for major functionalities of the Armadillo library.

This extension is currently under development. Many funtionalities are not yet implemented, or otherwise may change greatly in the future.

2. Requirements

Dependency Requirements
Operating system Unix-like (Linux, macOS, ...)
PHP version 7.1 and above
C++ compiler has C++17 support (gcc 7, clang 5, ...)
Armadillo latest stable release

3. Documentation

The documentation for php-armadillo is coming soon. Before that, the following items may help you understand how to use this extension.

4. Examples

Here is a simple example for using php-armadillo.

// Create a 3x3 dense matrix with random complex numbers as elements. 
$mat = Arma\CxDMat::init(3, 3, Arma\Fill::RANDN);
// Print the matrix to STDOUT.
// Set the value of element at row 2 col 2 to 1.0+j2.0.
$mat->at(1, 1)->setTo(Arma\cx_double(1., 2.));
// Calculate the matrix inverse and save to file in HDF5 format.
$mat->i()->save('mat.hdf5', Arma\FileType::HDF5_BINARY);