src/Phpml/Math/LinearAlgebra/EigenvalueDecomposition.php 1 location
|
@@ 413-417 (lines=5) @@
|
410 |
|
if ($k != $i) { |
411 |
|
$this->d[$k] = $this->d[$i]; |
412 |
|
$this->d[$i] = $p; |
413 |
|
for ($j = 0; $j < $this->n; ++$j) { |
414 |
|
$p = $this->V[$j][$i]; |
415 |
|
$this->V[$j][$i] = $this->V[$j][$k]; |
416 |
|
$this->V[$j][$k] = $p; |
417 |
|
} |
418 |
|
} |
419 |
|
} |
420 |
|
} |
src/Phpml/Math/LinearAlgebra/LUDecomposition.php 1 location
|
@@ 127-131 (lines=5) @@
|
124 |
|
} |
125 |
|
|
126 |
|
if ($p != $j) { |
127 |
|
for ($k = 0; $k < $this->n; ++$k) { |
128 |
|
$t = $this->LU[$p][$k]; |
129 |
|
$this->LU[$p][$k] = $this->LU[$j][$k]; |
130 |
|
$this->LU[$j][$k] = $t; |
131 |
|
} |
132 |
|
|
133 |
|
$k = $this->piv[$p]; |
134 |
|
$this->piv[$p] = $this->piv[$j]; |