add basic wrapper for libdai and corresponding test