New function to run clique tree sum product directly on the join tree.