libdai fork http://cs.ru.nl/~jorism/libDAI/