Implementing EP on a factor graph.