You are here

public function PHPExcel_Shared_JAMA_QRDecomposition::getR in Loft Data Grids 7.2

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

* Return the upper triangular factor * *

Return value

Matrix upper triangular factor

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/QRDecomposition.php, line 135

Class

PHPExcel_Shared_JAMA_QRDecomposition
@package JAMA

Code

public function getR() {
  for ($i = 0; $i < $this->n; ++$i) {
    for ($j = 0; $j < $this->n; ++$j) {
      if ($i < $j) {
        $R[$i][$j] = $this->QR[$i][$j];
      }
      elseif ($i == $j) {
        $R[$i][$j] = $this->Rdiag[$i];
      }
      else {
        $R[$i][$j] = 0.0;
      }
    }
  }
  return new PHPExcel_Shared_JAMA_Matrix($R);
}