src/Phpml/Math/LinearAlgebra/EigenvalueDecomposition.php 1 location
|
@@ 286-290 (lines=5) @@
|
| 283 |
|
if ($k != $i) { |
| 284 |
|
$this->d[$k] = $this->d[$i]; |
| 285 |
|
$this->d[$i] = $p; |
| 286 |
|
for ($j = 0; $j < $this->n; ++$j) { |
| 287 |
|
$p = $this->V[$j][$i]; |
| 288 |
|
$this->V[$j][$i] = $this->V[$j][$k]; |
| 289 |
|
$this->V[$j][$k] = $p; |
| 290 |
|
} |
| 291 |
|
} |
| 292 |
|
} |
| 293 |
|
} |
src/Phpml/Math/LinearAlgebra/LUDecomposition.php 1 location
|
@@ 111-115 (lines=5) @@
|
| 108 |
|
} |
| 109 |
|
} |
| 110 |
|
if ($p != $j) { |
| 111 |
|
for ($k = 0; $k < $this->n; ++$k) { |
| 112 |
|
$t = $this->LU[$p][$k]; |
| 113 |
|
$this->LU[$p][$k] = $this->LU[$j][$k]; |
| 114 |
|
$this->LU[$j][$k] = $t; |
| 115 |
|
} |
| 116 |
|
$k = $this->piv[$p]; |
| 117 |
|
$this->piv[$p] = $this->piv[$j]; |
| 118 |
|
$this->piv[$j] = $k; |