Download the PHP package busybrain/matrix without Composer

On this page you can find all versions of the php package busybrain/matrix. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package matrix

Looking at this 2 years after i wrote this code and i am only glad at the progress i have made :)


A simple, fluent and stable PHP library for playing around with matrices

Build Status

SIMPLE PHP LIBRARY FOR PLAYING WITH MATRICES

The focus of this project is simplicity, beautiful syntax and speed. It allows you work seemlessly with matrices in php. It comes with a handful of methods that you can use to write your own matrix logics

Getting started

You can create an instance of the class using the new keyword and immediately call the set mathod which sets a matrix value into the class ready for manipulation. Each matrix instance must be a multidimensional array.

you can as well use the static make method on the matrix class. this recieves a matrix instance as an argument and does exactly the same thing as the previous code retruning an instance of the class created

you can also set scalar values for operations that require scalar values using the set scalar method. The library allows chaining methods.

identity matrix

You can create an identity matrix by simply using the identity matrix method in the matrix class

conver scalar to matrix

you can convert a scalar to an n by m matrix using the scalarToMatrix method

operations

the library currently support the following operations and is still being worked on for others

  1. Addition ----------------------- add
  2. subtraction -------------------- subtract
  3. Multiplication -----------------multiply
  4. Determinant----------------------det
  5. Transpose------------------------ transpose

You can use each one by first setting up the matrix with all the parameters needed then calling their endpoint on it.

Except for the detrminant where the result is a scalar, other operations gives an instance of the matrix class when the endpoint is called as a method instead of as a property. Hence we can chain multiple operations together. When you call the setScalar method on the addition or subtraction operation, the scalar would be converted to marix and included in the operation

Other methods

There are a handful of methods that can give you details about a matrix . You can call them all on the matrix instance.

Validation

you can run valiation on a matrix against a set of attributes using the validate method . The validation options currently supported are

dim:row,col ------- checks if the matrix dimension matches the option given square --------- checks if the matrix is a square matrix singualr ------- checks if the matrix is a singular matrix

you can also write closure based validations . it takes two arguments, first is the matrix being validated while the second is a function that is called when the validation returns false to pass the appropriate validation message

the validate method returns a boolean result. For debugging purpose, the package also has a method that returns the validation errors. use validateWithMessage instead

the method returns an array of the validation errors. An empty array is returned if the validation passes


All versions of matrix with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
illuminate/container Version ^7.11
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package busybrain/matrix contains the following files

Loading the files please wait ....