mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +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();
|
||||
$X = $B->getMatrix($this->piv, 0, $n - 1);
|
||||
// todo: fix get extract
|
||||
|
||||
|
||||
// Solve L*Y = B(piv,:)
|
||||
for ($k = 0; $k < $this->n; ++$k) {
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ class QRDecomposition
|
|||
return $this->matrix;
|
||||
}
|
||||
|
||||
public function solve(Matrix $B)
|
||||
public function solve(Matrix $B) : Matrix
|
||||
{
|
||||
if ($B->getRowDimension() !== $this->m) {
|
||||
}
|
||||
|
|
@ -189,6 +189,6 @@ class QRDecomposition
|
|||
$matrix = new Matrix();
|
||||
$matrix->setArray($X);
|
||||
|
||||
return $matrix->getMatrix(0, $this->n - 1, 0, $nx);
|
||||
return $matrix;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user