Example #1
0
        public void fillic()
        {
            Queue <Node> Q = new Queue <Node>();

            Q.Enqueue(root);
            Node h;

            while (Q.Count > 0)
            {
                h = Q.Dequeue();
                if (h.NodeDef == 0)
                {
                    if (h.yes != null)
                    {
                        Q.Enqueue(h.yes);
                    }
                    if (h.no != null)
                    {
                        Q.Enqueue(h.no);
                    }
                }
                if (h != null && h.NodeDef == 2)
                {
                    ic             hold   = h.d.ic;
                    diseases       pasdis = new diseases(AllDiseases, hold.diseases);
                    List <symptom> passym = new List <symptom>();
                    //Console.WriteLine(pasdis.Count);
                    h.ic = insert(h, pasdis, passym);
                }
            }
        }
Example #2
0
 public data(int i, object obj)
 {
     if (i == 0)
     {
         ic = null;
         d  = null;
         s  = (symptom)obj;
     }
     else if (i == 1)
     {
         ic = null;
         s  = null;
         d  = (disease)obj;
     }
     else if (i == 2)
     {
         ic = (ic)obj;
         s  = null;
         d  = null;
     }
     else
     {
         ic = null;
         s  = null;
         d  = null;
     }
 }