PHP Class MathPHP\LinearAlgebra\DiagonalMatrix

The off-diagonal elements are all zero
Inheritance: extends SquareMatrix
Show file Open project: markrogoyski/math-php

Public Methods

Method Description
__construct ( array $D ) A Diagonal Matrix is constucted from a single-row array.
isSymmetric ( ) : boolean Diagonal matrix must be symmetric

Method Details

__construct() public method

The elements of this array are placed on the diagonal of a square matrix.
public __construct ( array $D )
$D array

isSymmetric() public method

Diagonal matrix must be symmetric
public isSymmetric ( ) : boolean
return boolean