Download the PHP package sivlev/phpmathobjects without Composer
On this page you can find all versions of the php package sivlev/phpmathobjects. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sivlev/phpmathobjects
More information about sivlev/phpmathobjects
Files in sivlev/phpmathobjects
Package phpmathobjects
Short Description PHPMathObjects: A PHP library for handling mathematical objects.
License MIT
Homepage https://github.com/sivlev/phpmathobjects/
Informations about the package phpmathobjects
PHPMathObjects - A PHP library to handle mathematical objects
The PHPMathObjects library was created with crystallographic applications in mind but should be suitable for broad variety of projects. The library has 100 % coverage with unit tests and is performance-optimized. Being actively developed, it is not yet suitable for production environment since the current API is subject to change.
Installation
Install PHPMathObjects using Composer:
or include the following line to your composer.json
file:
Requirements
The library requires PHP 8.2 or above. No other external dependencies are required.
How to use
This section contains simplified lists of PHPMathObjects API methods. Some parameters with default values are omitted for clarity. For full API reference please refer to .
Contents
-
General Mathematics
- Math
-
Linear Algebra
- Matrix
- Vector
- Numbers
- Rational
General mathematics
Math
class contains common math functions that may be needed in various areas. The functions are implemented as static methods.
Linear Algebra
Matrix
Many matrix methods in PHPMathObjects are implemented in two versions: non-mutating (return a new matrix object) and mutating (change the existing matrix). The latter method names have a letter "m" in the beginning, e.g. add() and mAdd(), transpose() and mTranspose(), etc. You can decide which method is more suitable for a particular task. Usually the mutating methods are slightly faster than non-mutating ones because no new object instantiation is needed.
Vector
Vector class extends the Matrix class so all Matrix methods are available too. Some of them have additional wrappers for more convenient usage, e.g. fill() vs. vectorFill().
Numbers
Rational
A class to store rational numbers and perform mathematical operations on them