Bayesian Networks and Decision Diagrams