diff --git a/Math/Matrix/LUDecomposition.php b/Math/Matrix/LUDecomposition.php index b3e329518..96c99aa16 100644 --- a/Math/Matrix/LUDecomposition.php +++ b/Math/Matrix/LUDecomposition.php @@ -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) { diff --git a/Math/Matrix/QRDecomposition.php b/Math/Matrix/QRDecomposition.php index 55d5ede91..a7c93b977 100644 --- a/Math/Matrix/QRDecomposition.php +++ b/Math/Matrix/QRDecomposition.php @@ -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; } } \ No newline at end of file