PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\math\Matrix Class Reference
+ Inheritance diagram for pocketmine\math\Matrix:
+ Collaboration diagram for pocketmine\math\Matrix:

Public Member Functions

 __construct (int $rows, int $columns, array $set=[])
 
 __toString ()
 
 add (Matrix $matrix)
 
 determinant ()
 
 divideScalar (float $number)
 
 getColumns ()
 
 getElement (int $row, int $column)
 
 getRows ()
 
 isSquare ()
 
 multiplyScalar (float $number)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 product (Matrix $matrix)
 
 set (array $m)
 
 setElement (int $row, int $column, float $value)
 
 subtract (Matrix $matrix)
 
 transpose ()
 

Detailed Description

@phpstan-implements \ArrayAccess<int, float[]>

Definition at line 33 of file Matrix.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\math\Matrix::__construct ( int $rows,
int $columns,
array $set = [] )
Parameters
float[][]$set

Definition at line 59 of file Matrix.php.

Member Function Documentation

◆ __toString()

pocketmine\math\Matrix::__toString ( )

Definition at line 212 of file Matrix.php.

◆ add()

pocketmine\math\Matrix::add ( Matrix $matrix)

Definition at line 104 of file Matrix.php.

◆ determinant()

pocketmine\math\Matrix::determinant ( )

Computation of the determinant of 1x1, 2x2 and 3x3 matrices

Definition at line 192 of file Matrix.php.

◆ divideScalar()

pocketmine\math\Matrix::divideScalar ( float $number)

Definition at line 145 of file Matrix.php.

◆ getColumns()

pocketmine\math\Matrix::getColumns ( )

Definition at line 81 of file Matrix.php.

◆ getElement()

pocketmine\math\Matrix::getElement ( int $row,
int $column )

Definition at line 92 of file Matrix.php.

◆ getRows()

pocketmine\math\Matrix::getRows ( )

Definition at line 77 of file Matrix.php.

◆ isSquare()

pocketmine\math\Matrix::isSquare ( )

Definition at line 100 of file Matrix.php.

◆ multiplyScalar()

pocketmine\math\Matrix::multiplyScalar ( float $number)

Definition at line 134 of file Matrix.php.

◆ offsetExists()

pocketmine\math\Matrix::offsetExists ( $offset)

Definition at line 39 of file Matrix.php.

◆ offsetGet()

pocketmine\math\Matrix::offsetGet ( $offset)

Definition at line 44 of file Matrix.php.

◆ offsetSet()

pocketmine\math\Matrix::offsetSet ( $offset,
$value )

Definition at line 48 of file Matrix.php.

◆ offsetUnset()

pocketmine\math\Matrix::offsetUnset ( $offset)

Definition at line 52 of file Matrix.php.

◆ product()

pocketmine\math\Matrix::product ( Matrix $matrix)

Naive Matrix product, O(n^3)

Definition at line 170 of file Matrix.php.

◆ set()

pocketmine\math\Matrix::set ( array $m)
Parameters
float[][]$m

Definition at line 68 of file Matrix.php.

◆ setElement()

pocketmine\math\Matrix::setElement ( int $row,
int $column,
float $value )

Definition at line 85 of file Matrix.php.

◆ subtract()

pocketmine\math\Matrix::subtract ( Matrix $matrix)

Definition at line 119 of file Matrix.php.

◆ transpose()

pocketmine\math\Matrix::transpose ( )

Definition at line 156 of file Matrix.php.


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