a set of (dumb) inference algorithms in c++