More types for static analysis

This commit is contained in:
2023-08-02 14:14:10 +00:00
parent a2c5252cf2
commit 4ddde1e277
7 changed files with 16 additions and 17 deletions

View File

@ -198,8 +198,7 @@ class GaussianWeightedSumFactor extends GaussianFactor
// The tricky part here is that we have to put the messages and variables in the same
// order as the weights. Thankfully, the weights and messages share the same index numbers,
// so we just need to make sure they're consistent
$allMessagesCount = is_countable($allMessages) ? count($allMessages) : 0;
for ($i = 0; $i < $allMessagesCount; $i++) {
for ($i = 0; $i < count($allMessages); $i++) {
$updatedMessages[] = $allMessages[$indicesToUse[$i]];
$updatedVariables[] = $allVariables[$indicesToUse[$i]];
}