Code Duplication    Length = 10-10 lines in 2 locations

src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php 1 location

@@ 267-276 (lines=10) @@
264
                    }
265
                }
266
                // Solve U*X = Y;
267
                for ($k = $this->n - 1; $k >= 0; --$k) {
268
                    for ($j = 0; $j < $nx; ++$j) {
269
                        $X->A[$k][$j] /= $this->LU[$k][$k];
270
                    }
271
                    for ($i = 0; $i < $k; ++$i) {
272
                        for ($j = 0; $j < $nx; ++$j) {
273
                            $X->A[$i][$j] -= $X->A[$k][$j] * $this->LU[$i][$k];
274
                        }
275
                    }
276
                }
277
278
                return $X;
279
            }

src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php 1 location

@@ 127-136 (lines=10) @@
124
                    }
125
                }
126
127
                for ($k = $this->m - 1; $k >= 0; --$k) {
128
                    for ($j = 0; $j < $nx; ++$j) {
129
                        $X[$k][$j] /= $this->L[$k][$k];
130
                    }
131
                    for ($i = 0; $i < $k; ++$i) {
132
                        for ($j = 0; $j < $nx; ++$j) {
133
                            $X[$i][$j] -= $X[$k][$j] * $this->L[$k][$i];
134
                        }
135
                    }
136
                }
137
138
                return new Matrix($X, $this->m, $nx);
139
            }