Undirected Probailistic Graphical Modes for C++