public BinaryTreeElement(int number, double value)
 {
     this.Number = number;
     this.Value  = value;
     this.Right  = null;
     this.Left   = null;
 }
Exemplo n.º 2
0
 public void Traverse(BinaryTreeElement element)
 {
     if (element.HasNext())
     {
         Traverse(element.Left);
         Traverse(element.Right);
     }
     else
     {
         this.MatchCollection.Add(element);
         return;
     }
 }
Exemplo n.º 3
0
 public void Separate(BinaryTreeElement element)
 {
     if (element.HasNext())
     {
         Separate(element.Left);
         Separate(element.Right);
     }
     else
     {
         this.MatchCollection.Add(element);
         return;
     }
 }
 public void SetLeftElement(BinaryTreeElement left)
 {
     this.Left = left;
 }
 public void SetRightElement(BinaryTreeElement right)
 {
     this.Right = right;
 }
Exemplo n.º 6
0
 public BinaryTreeElement FindElement(int number)
 {
     this.current = this.elements.FirstOrDefault(x => x.Number.Equals(number));
     return(current);
 }