Code Duplication    Length = 3-5 lines in 2 locations

src/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
    }
@@ 231-233 (lines=3) @@
228
    public function det(): float
229
    {
230
        $d = $this->pivsign;
231
        for ($j = 0; $j < $this->n; ++$j) {
232
            $d *= $this->LU[$j][$j];
233
        }
234
235
        return (float) $d;
236
    }