From 4c8244529763d00f303c8c4241bdcfb08dfaee77 Mon Sep 17 00:00:00 2001 From: Lars Karlslund Date: Fri, 26 Aug 2022 16:40:39 +0200 Subject: [PATCH] Fix for the only edges having negative probabilities resulting in zero as the max value --- modules/engine/edge.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/engine/edge.go b/modules/engine/edge.go index 40b0b3c..0087ed1 100644 --- a/modules/engine/edge.go +++ b/modules/engine/edge.go @@ -267,7 +267,7 @@ func (m EdgeBitmap) IsSet(method Edge) bool { } func (m EdgeBitmap) MaxProbability(source, target *Object) Probability { - var max Probability + max := MINPROBABILITY for i := 0; i < len(edgeInfos); i++ { if m.IsSet(Edge(i)) { prob := Edge(i).Probability(source, target)