Fix qr decomposition solve return type

This commit is contained in:
Dennis Eichhorn 2017-11-15 13:11:51 +01:00
parent 39bb8c83d4
commit 041d604f2b
2 changed files with 2 additions and 3 deletions

View File

@ -164,7 +164,6 @@ class LUDecomposition
$n = $B->getN();
$X = $B->getMatrix($this->piv, 0, $n - 1);
// todo: fix get extract
// Solve L*Y = B(piv,:)
for ($k = 0; $k < $this->n; ++$k) {

View File

@ -151,7 +151,7 @@ class QRDecomposition
return $this->matrix;
}
public function solve(Matrix $B)
public function solve(Matrix $B) : Matrix
{
if ($B->getRowDimension() !== $this->m) {
}
@ -189,6 +189,6 @@ class QRDecomposition
$matrix = new Matrix();
$matrix->setArray($X);
return $matrix->getMatrix(0, $this->n - 1, 0, $nx);
return $matrix;
}
}