public static void bayesRejectionSamplingDemo() {
System.out.println("DEMO: Bayes Rejection Sampling N = " + NUM_SAMPLES);
System.out.println("==============================");
demoToothacheCavityCatchModel(new FiniteBayesModel(
BayesNetExampleFactory.constructToothacheCavityCatchNetwork(),
new BayesInferenceApproxAdapter(new RejectionSampling(),
NUM_SAMPLES)));
demoBurglaryAlarmModel(new FiniteBayesModel(
BayesNetExampleFactory.constructBurglaryAlarmNetwork(),
new BayesInferenceApproxAdapter(new RejectionSampling(),
NUM_SAMPLES)));
System.out.println("==============================");
}