Code Duplication    Length = 9-9 lines in 3 locations

src/Phpml/Math/LinAlg/EigenValueDecomposition.php 3 locations

@@ 611-619 (lines=9) @@
608
                        $q = $q / $p;
609
                        $r = $r / $p;
610
                        // Row modification
611
                        for ($j = $k; $j < $nn; ++$j) {
612
                            $p = $this->H[$k][$j] + $q * $this->H[$k+1][$j];
613
                            if ($notlast) {
614
                                $p = $p + $r * $this->H[$k+2][$j];
615
                                $this->H[$k+2][$j] = $this->H[$k+2][$j] - $p * $z;
616
                            }
617
                            $this->H[$k][$j] = $this->H[$k][$j] - $p * $x;
618
                            $this->H[$k+1][$j] = $this->H[$k+1][$j] - $p * $y;
619
                        }
620
                        // Column modification
621
                        for ($i = 0; $i <= min($n, $k+3); ++$i) {
622
                            $p = $x * $this->H[$i][$k] + $y * $this->H[$i][$k+1];
@@ 621-629 (lines=9) @@
618
                            $this->H[$k+1][$j] = $this->H[$k+1][$j] - $p * $y;
619
                        }
620
                        // Column modification
621
                        for ($i = 0; $i <= min($n, $k+3); ++$i) {
622
                            $p = $x * $this->H[$i][$k] + $y * $this->H[$i][$k+1];
623
                            if ($notlast) {
624
                                $p = $p + $z * $this->H[$i][$k+2];
625
                                $this->H[$i][$k+2] = $this->H[$i][$k+2] - $p * $r;
626
                            }
627
                            $this->H[$i][$k] = $this->H[$i][$k] - $p;
628
                            $this->H[$i][$k+1] = $this->H[$i][$k+1] - $p * $q;
629
                        }
630
                        // Accumulate transformations
631
                        for ($i = $low; $i <= $high; ++$i) {
632
                            $p = $x * $this->V[$i][$k] + $y * $this->V[$i][$k+1];
@@ 631-639 (lines=9) @@
628
                            $this->H[$i][$k+1] = $this->H[$i][$k+1] - $p * $q;
629
                        }
630
                        // Accumulate transformations
631
                        for ($i = $low; $i <= $high; ++$i) {
632
                            $p = $x * $this->V[$i][$k] + $y * $this->V[$i][$k+1];
633
                            if ($notlast) {
634
                                $p = $p + $z * $this->V[$i][$k+2];
635
                                $this->V[$i][$k+2] = $this->V[$i][$k+2] - $p * $r;
636
                            }
637
                            $this->V[$i][$k] = $this->V[$i][$k] - $p;
638
                            $this->V[$i][$k+1] = $this->V[$i][$k+1] - $p * $q;
639
                        }
640
                    }  // ($s != 0)
641
                }  // k loop
642
            }  // check convergence