From f1e6e7a63b384aab9e8853dc4dd7a9a1da0caccd Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 26 Oct 2017 18:53:26 +0200 Subject: [PATCH] Fix #127 --- Math/Matrix/LUDecomposition.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Math/Matrix/LUDecomposition.php b/Math/Matrix/LUDecomposition.php index 6517f2c4d..2924ec455 100644 --- a/Math/Matrix/LUDecomposition.php +++ b/Math/Matrix/LUDecomposition.php @@ -84,6 +84,8 @@ class LUDecomposition public function getL() { + $L = [[]]; + for ($i = 0; $i < $this->m; ++$i) { for ($j = 0; $j < $this->n; ++$j) { if ($i > $j) { @@ -104,6 +106,8 @@ class LUDecomposition public function getU() { + $U = [[]]; + for ($i = 0; $i < $this->n; ++$i) { for ($j = 0; $j < $this->n; ++$j) { if ($i <= $j) { @@ -154,8 +158,6 @@ class LUDecomposition if (!$this->isNonsingular()) { } - var_dump($this->piv); - $nx = $B->getM(); $X = $B->getMatrix($this->piv, 0, $nx-1);