Fixed the junction tree methods to allow nodes to have different numbers of states (thanks to Elad Mezuman).

Fixed the junction tree methods to allow nodes to have different numbers
of states (thanks to Elad Mezuman).