Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 80-89 (lines=10) @@
77
                    }
78
                    $this->QR[$k][$k] += 1.0;
79
                    // Apply transformation to remaining columns.
80
                    for ($j = $k+1; $j < $this->n; ++$j) {
81
                        $s = 0.0;
82
                        for ($i = $k; $i < $this->m; ++$i) {
83
                            $s += $this->QR[$i][$k] * $this->QR[$i][$j];
84
                        }
85
                        $s = -$s/$this->QR[$k][$k];
86
                        for ($i = $k; $i < $this->m; ++$i) {
87
                            $this->QR[$i][$j] += $s * $this->QR[$i][$k];
88
                        }
89
                    }
90
                }
91
                $this->Rdiag[$k] = -$nrm;
92
            }

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

@@ 191-200 (lines=10) @@
188
            }
189
            for ($k = $nct - 1; $k >= 0; --$k) {
190
                if ($this->s[$k] != 0.0) {
191
                    for ($j = $k + 1; $j < $nu; ++$j) {
192
                        $t = 0;
193
                        for ($i = $k; $i < $this->m; ++$i) {
194
                            $t += $this->U[$i][$k] * $this->U[$i][$j];
195
                        }
196
                        $t = -$t / $this->U[$k][$k];
197
                        for ($i = $k; $i < $this->m; ++$i) {
198
                            $this->U[$i][$j] += $t * $this->U[$i][$k];
199
                        }
200
                    }
201
                    for ($i = $k; $i < $this->m; ++$i) {
202
                        $this->U[$i][$k] = -$this->U[$i][$k];
203
                    }