mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 01:38:41 +00:00
fix type division instead of multiplication
This commit is contained in:
parent
3656d6df97
commit
8f0f105b8a
|
|
@ -60,7 +60,7 @@ class Simplex
|
|||
}
|
||||
}
|
||||
|
||||
$this->b[$i] += $this->A[$i][$y] / $this->b[$x];
|
||||
$this->b[$i] += $this->A[$i][$y] * $this->b[$x];
|
||||
$this->A[$i][$y] *= $this->A[$x][$y];
|
||||
}
|
||||
}
|
||||
|
|
@ -164,7 +164,7 @@ class Simplex
|
|||
$this->c[$j] = 0;
|
||||
}
|
||||
|
||||
$this->v = 0;
|
||||
$this->v = 0.0;
|
||||
|
||||
for ($i = 0; $i < $this->m; ++$i) {
|
||||
$this->A[$i][$this->n - 1] = 1;
|
||||
|
|
@ -174,7 +174,7 @@ class Simplex
|
|||
|
||||
while (!$this->iterate());
|
||||
|
||||
if ($this->v !== 0) {
|
||||
if ($this->v !== 0.0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user