Esempio n. 1
0
        private static void Main(string[] args)
        {
            var net = new BNet();
            net.Build("..\\..\\data\\bn_wetGrass.xml");

            net.PrintNet("..\\..\\data\\BNet_layout.txt");

            BNInfer infer = new BElim(net);

            double pr = infer.GetBelief("Rain=1", "WetGrass=1");
            Console.WriteLine(" Result: {0}", pr);

            pr = infer.GetBelief("Sprinkler=1", "WetGrass=1");
            Console.WriteLine(" Result: {0}", pr);

            Console.ReadLine();
        }
Esempio n. 2
0
        private static void Main(string[] args)
        {
            var net = new BNet();

            net.Build("..\\..\\data\\bn_wetGrass.xml");

            net.PrintNet("..\\..\\data\\BNet_layout.txt");

            BNInfer infer = new BElim(net);

            double pr = infer.GetBelief("Rain=1", "WetGrass=1");

            Console.WriteLine(" Result: {0}", pr);

            pr = infer.GetBelief("Sprinkler=1", "WetGrass=1");
            Console.WriteLine(" Result: {0}", pr);

            Console.ReadLine();
        }
Esempio n. 3
0
 protected BNInfer(BNet net)
 {
     m_net = net;
 }
Esempio n. 4
0
        public BElim(BNet net) : base(net)
        {
            m_buckets = new ArrayList();

            PrepareBuckets();
        }
Esempio n. 5
0
 protected BNInfer(BNet net)
 {
     m_net = net;
 }
Esempio n. 6
0
        public BElim(BNet net) : base(net)
        {
            m_buckets = new ArrayList();

            PrepareBuckets();
        }