You are here

public function EigenvalueDecomposition::getD in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/EigenvalueDecomposition.php \EigenvalueDecomposition::getD()

* Return the block diagonal eigenvalue matrix * * @access public *

Return value

D

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/EigenvalueDecomposition.php, line 849

Class

EigenvalueDecomposition
@package JAMA

Code

public function getD() {
  for ($i = 0; $i < $this->n; ++$i) {
    $D[$i] = array_fill(0, $this->n, 0.0);
    $D[$i][$i] = $this->d[$i];
    if ($this->e[$i] == 0) {
      continue;
    }
    $o = $this->e[$i] > 0 ? $i + 1 : $i - 1;
    $D[$i][$o] = $this->e[$i];
  }
  return new Matrix($D);
}