exact-inference

General purpose algorithm for triangulating an undirected graph?

I am playing around with implementing a junction tree algorithm for belief propagation on a Bayesian Network. I'm struggling a bit with triangulating the graph so the junction trees can be formed. I understand that finding the optimal triangulation is NP-complete, but can you point me to a general purpose algorithm that results in a 'g...