Wrote ApplyProbabilities in BayesianNet... not tested, compiling