score function

Computes the score of a BN or a DBN