IDSIA / crema

Crema: Credal Models Algorithms
https://crema-toolbox.readthedocs.io/
GNU Lesser General Public License v3.0
10 stars 4 forks source link

Fixed issue with disjoint graph and LoopyBeliefPropagation. #107

Closed cbonesana closed 2 years ago

cbonesana commented 2 years ago

When using a disjoint graph (as an example, the result of a CutObserved preprocessing where one query node is isolated from the other) as an input for a LoopyBeliefPropagation, an exception is raised. The issue is generated from an empty list of incoming edfges cause by the disjoint graph.

This change fix this issue by checking if we have any incoming edges for a query node.