Example #1
0
 public double CalcProb(HashSet <String> set)
 {
     if (Name == null)
     {
         return(Weight);
     }
     else
     {
         if (set.Contains(Name))
         {
             return(Weight * LeftChild.CalcProb(set));
         }
         else
         {
             return(Weight * RightChild.CalcProb(set));
         }
     }
 }