fix tests

This commit is contained in:
Dennis Eichhorn 2023-10-22 16:08:16 +00:00
parent 8c9e6929d0
commit 3656d6df97

View File

@ -35,7 +35,7 @@ class Simplex
private array $c = []; private array $c = [];
private int $v = 0; private float $v = 0.0;
private array $Basic = []; private array $Basic = [];
@ -228,7 +228,7 @@ class Simplex
for ($j = 0; $j < $this->n; ++$j) { for ($j = 0; $j < $this->n; ++$j) {
$ok = false; $ok = false;
for ($k = 0; $k < $this->n; ++$k) { for ($k = 0; $k < $this->n; ++$k) {
if ($j = $this->Nonbasic[$k]) { if ($j === $this->Nonbasic[$k]) {
$this->c[$k] += $oldC[$j]; $this->c[$k] += $oldC[$j];
$ok = true; $ok = true;
break; break;