mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 06:28:40 +00:00
Fix qr decomposition solve return type
This commit is contained in:
parent
39bb8c83d4
commit
041d604f2b
|
|
@ -164,7 +164,6 @@ class LUDecomposition
|
||||||
$n = $B->getN();
|
$n = $B->getN();
|
||||||
$X = $B->getMatrix($this->piv, 0, $n - 1);
|
$X = $B->getMatrix($this->piv, 0, $n - 1);
|
||||||
// todo: fix get extract
|
// todo: fix get extract
|
||||||
|
|
||||||
|
|
||||||
// Solve L*Y = B(piv,:)
|
// Solve L*Y = B(piv,:)
|
||||||
for ($k = 0; $k < $this->n; ++$k) {
|
for ($k = 0; $k < $this->n; ++$k) {
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ class QRDecomposition
|
||||||
return $this->matrix;
|
return $this->matrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function solve(Matrix $B)
|
public function solve(Matrix $B) : Matrix
|
||||||
{
|
{
|
||||||
if ($B->getRowDimension() !== $this->m) {
|
if ($B->getRowDimension() !== $this->m) {
|
||||||
}
|
}
|
||||||
|
|
@ -189,6 +189,6 @@ class QRDecomposition
|
||||||
$matrix = new Matrix();
|
$matrix = new Matrix();
|
||||||
$matrix->setArray($X);
|
$matrix->setArray($X);
|
||||||
|
|
||||||
return $matrix->getMatrix(0, $this->n - 1, 0, $nx);
|
return $matrix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user