Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
Builder Class Reference

Matrix Builder class. More...

Static Public Member Functions

static createFilledMatrix ($fillValue, $rows, $columns=null)
 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.
 
static createIdentityMatrix ($dimensions, $fillValue=null)
 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.
 

Detailed Description

Matrix Builder class.

Member Function Documentation

◆ createFilledMatrix()

static Builder::createFilledMatrix ( $fillValue,
$rows,
$columns = null )
static

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$fillValue
int$rows
int | null$columns
Return values
Matrix
Exceptions
Exception

◆ createIdentityMatrix()

static Builder::createIdentityMatrix ( $dimensions,
$fillValue = null )
static

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
int$dimensions
Return values
Matrix
Exceptions
Exception

The documentation for this class was generated from the following file: