PHP bindings for Armadillo.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
CismonX b89fc78664 update .travis.yml 2 years ago
src add `isZero()` 3 years ago
stubs Add stub for `isZero`. 3 years ago
tests rename tests 3 years ago
.gitattributes update configuration files 3 years ago
.gitignore Add PCH support for faster building. 3 years ago
.travis.yml update .travis.yml 2 years ago
EXPERIMENTAL update 4 years ago
LICENSE update 4 years ago
README.md integrating Codecov 3 years ago
config.m4 Update Armadillo version; Better detection of clang; Add some preprocessor directives. 3 years ago

README.md

php-armadillo

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.
$mat->print();
// 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);