\Matrix

Namespaces

Operators

Classes

Autoloader Autoloader for Matrix classes
Builder Matrix Builder class.
Exception
Functions
Matrix Matrix object.

Functions

add()

add(  $matrixValues) : \Matrix\Matrix

Adds two or more matrices

Parameters

$matrixValues

Throws

\Matrix\Exception

Returns

\Matrix\Matrix

adjoint()

adjoint(\Matrix\Matrix|array  $matrix) : \Matrix\Matrix

Returns the adjoint of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

\Matrix\Matrix

The new matrix

antidiagonal()

antidiagonal(\Matrix\Matrix|array  $matrix) : \Matrix\Matrix

Returns the antidiagonal of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

\Matrix\Matrix

The new matrix

cofactors()

cofactors(\Matrix\Matrix|array  $matrix) : \Matrix\Matrix

Returns the cofactors of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

\Matrix\Matrix

The new matrix

determinant()

determinant(\Matrix\Matrix|array  $matrix) : float

Returns the determinant of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

float —

Matrix determinant

diagonal()

diagonal(\Matrix\Matrix|array  $matrix) : \Matrix\Matrix

Returns the diagonal of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

\Matrix\Matrix

The new matrix

directsum()

directsum(  $matrixValues) : \Matrix\Matrix

Adds two or more matrices

Parameters

$matrixValues

Throws

\Matrix\Exception

Returns

\Matrix\Matrix

divideby()

divideby(  $matrixValues) : \Matrix\Matrix

Divides two or more matrix numbers

Parameters

$matrixValues

Throws

\Matrix\Exception

Returns

\Matrix\Matrix

divideinto()

divideinto(  $matrixValues) : \Matrix\Matrix

Divides two or more matrix numbers

Parameters

$matrixValues

Throws

\Matrix\Exception

Returns

\Matrix\Matrix

identity()

identity(\Matrix\Matrix|array  $matrix) : \Matrix\Matrix

Returns the identity of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

\Matrix\Matrix

The identity matrix

inverse()

inverse(\Matrix\Matrix|array  $matrix) : \Matrix\Matrix

Returns the inverse of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

\Matrix\Matrix

The new matrix

minors()

minors(\Matrix\Matrix|array  $matrix) : \Matrix\Matrix

Returns the minors of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

\Matrix\Matrix

The new matrix

multiply()

multiply(  $matrixValues) : \Matrix\Matrix

Multiplies two or more matrices

Parameters

$matrixValues

Throws

\Matrix\Exception

Returns

\Matrix\Matrix

subtract()

subtract(  $matrixValues) : \Matrix\Matrix

Subtracts two or more matrices

Parameters

$matrixValues

Throws

\Matrix\Exception

Returns

\Matrix\Matrix

trace()

trace(\Matrix\Matrix|array  $matrix) : float

Returns the trace of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

float —

The trace of the matrix

transpose()

transpose(\Matrix\Matrix|array  $matrix) : \Matrix\Matrix

Returns the transpose of a matrix or an array.

Parameters

\Matrix\Matrix|array $matrix

Matrix or an array to treat as a matrix.

Throws

\Matrix\Exception

If argument isn't a valid matrix or array.

Returns

\Matrix\Matrix

The transposed matrix