\MatrixBuilder

Matrix Builder class.

Summary

Methods
Properties
Constants
createFilledMatrix()
createIdentityMatrix()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

createFilledMatrix()

createFilledMatrix(mixed  $value, integer  $rows, integer|null  $columns = null) : \Matrix\Matrix

Create a new matrix of specified dimensions, and filled with a specified value If the column argument isn't provided, then a square matrix will be created

Parameters

mixed $value
integer $rows
integer|null $columns

Throws

\Matrix\Exception

Returns

\Matrix\Matrix

createIdentityMatrix()

createIdentityMatrix(integer  $dimensions) : \Matrix\Matrix

Create a new identity matrix of specified dimensions This will always be a square matrix, with the number of rows and columns matching the provided dimension

Parameters

integer $dimensions

Throws

\Matrix\Exception

Returns

\Matrix\Matrix