Code Duplication    Length = 3-5 lines in 2 locations

src/Phpml/Math/LinearAlgebra/LUDecomposition.php 2 locations

@@ 219-223 (lines=5) @@
216
     */
217
    public function isNonsingular(): bool
218
    {
219
        for ($j = 0; $j < $this->n; ++$j) {
220
            if ($this->LU[$j][$j] == 0) {
221
                return false;
222
            }
223
        }
224
225
        return true;
226
    }
@@ 242-244 (lines=3) @@
239
        }
240
241
        $d = $this->pivsign;
242
        for ($j = 0; $j < $this->n; ++$j) {
243
            $d *= $this->LU[$j][$j];
244
        }
245
246
        return $d;
247
    }