bn.addBeliefNode(bnodeSprinkler);
// note the order of execution of connect().
// domains are added in sequence as parent nodes are connected
bn.addEdge(bnodeCloudy, bnodeRain);
bn.addEdge(bnodeCloudy, bnodeSprinkler);
bn.addEdge(bnodeSprinkler, bnodeWetGrass);
bn.addEdge(bnodeRain, bnodeWetGrass);
// this is simple
TabularCPD table = (TabularCPD) bnodeCloudy.getFunction();