|
| __construct (array $grid) |
|
| getRows (int $row, int $rowCount=1) |
| Return a new matrix as a subset of rows from this matrix, starting at row number $row, and $rowCount rows A $rowCount value of 0 will return all rows of the matrix from $row A negative $rowCount value will return rows until that many rows from the end of the matrix. More...
|
|
| getColumns (int $column, int $columnCount=1) |
| Return a new matrix as a subset of columns from this matrix, starting at column number $column, and $columnCount columns A $columnCount value of 0 will return all columns of the matrix from $column A negative $columnCount value will return columns until that many columns from the end of the matrix. More...
|
|
| dropRows (int $row, int $rowCount=1) |
| Return a new matrix as a subset of rows from this matrix, dropping rows starting at row number $row, and $rowCount rows A negative $rowCount value will drop rows until that many rows from the end of the matrix A $rowCount value of 0 will remove all rows of the matrix from $row. More...
|
|
| dropColumns (int $column, int $columnCount=1) |
| Return a new matrix as a subset of columns from this matrix, dropping columns starting at column number $column, and $columnCount columns A negative $columnCount value will drop columns until that many columns from the end of the matrix A $columnCount value of 0 will remove all columns of the matrix from $column. More...
|
|
| getValue (int $row, int $column) |
| Return a value from this matrix, from the "cell" identified by the row and column numbers Note that row and column numbers start from 1, not from 0. More...
|
|
| rows () |
| Returns a Generator that will yield each row of the matrix in turn as a vector matrix or the value of each cell if the matrix is a column vector. More...
|
|
| columns () |
| Returns a Generator that will yield each column of the matrix in turn as a vector matrix or the value of each cell if the matrix is a row vector. More...
|
|
| isSquare () |
| Identify if the row and column dimensions of this matrix are equal, i.e. More...
|
|
| isVector () |
| Identify if this matrix is a vector i.e. More...
|
|
| toArray () |
| Return the matrix as a 2-dimensional array. More...
|
|
| solve (Matrix $B) |
| Solve A*X = B. More...
|
|
| __get (string $propertyName) |
| Access specific properties as read-only (no setters) More...
|
|
| __call (string $functionName, $arguments) |
| Returns the result of the function call or operation. More...
|
|
Definition at line 42 of file Matrix.php.
Matrix\Matrix::dropColumns |
( |
int |
$column, |
|
|
int |
$columnCount = 1 |
|
) |
| |
Return a new matrix as a subset of columns from this matrix, dropping columns starting at column number $column, and $columnCount columns A negative $columnCount value will drop columns until that many columns from the end of the matrix A $columnCount value of 0 will remove all columns of the matrix from $column.
Note that column numbers start from 1, not from 0
- Parameters
-
int | $column | |
int | $columnCount | |
- Returns
- static
- Exceptions
-
Definition at line 241 of file Matrix.php.
References $columnCount, $grid, and $row.
256 return new static(
$grid);
columns()
Returns a Generator that will yield each column of the matrix in turn as a vector matrix or the value...
validateColumnInRange(int $column)
Validate that a column number falls within the set of columns for this matrix.
Class for the creating "special" Matrices.
Matrix\Matrix::getColumns |
( |
int |
$column, |
|
|
int |
$columnCount = 1 |
|
) |
| |
Return a new matrix as a subset of columns from this matrix, starting at column number $column, and $columnCount columns A $columnCount value of 0 will return all columns of the matrix from $column A negative $columnCount value will return columns until that many columns from the end of the matrix.
Note that column numbers start from 1, not from 0
- Parameters
-
int | $column | |
int | $columnCount | |
- Returns
- Matrix
- Exceptions
-
Definition at line 187 of file Matrix.php.
References $columnCount, $grid, and $i.
Referenced by Matrix\Operators\Multiplication\multiplyMatrix().
196 $grid[] = array_column($this->grid,
$i);
199 return (
new static(
$grid))->transpose();
columns()
Returns a Generator that will yield each column of the matrix in turn as a vector matrix or the value...
validateColumnInRange(int $column)
Validate that a column number falls within the set of columns for this matrix.
Class for the creating "special" Matrices.
Matrix\Matrix::getRows |
( |
int |
$row, |
|
|
int |
$rowCount = 1 |
|
) |
| |
Return a new matrix as a subset of rows from this matrix, starting at row number $row, and $rowCount rows A $rowCount value of 0 will return all rows of the matrix from $row A negative $rowCount value will return rows until that many rows from the end of the matrix.
Note that row numbers start from 1, not from 0
- Parameters
-
- Returns
- static
- Exceptions
-
Definition at line 165 of file Matrix.php.
Referenced by Matrix\Decomposition\LU\pivotB().
168 if ($rowCount === 0) {
172 return new static(array_slice($this->grid,
$row - 1, (
int)$rowCount));
rows()
Returns a Generator that will yield each row of the matrix in turn as a vector matrix or the value of...
validateRowInRange(int $row)
Validate that a row number falls within the set of rows for this matrix.
Class for the creating "special" Matrices.