public CombinedNode(CombinedNode newNode) { this.name = newNode.name; this.probability = newNode.probability; this.type = newNode.type; this.val = newNode.val; this.Children = newNode.Children; this.IsInverse = newNode.IsInverse; }
public int GetPosition(int pos, CombinedNode node) { if (this == node) { return(pos); } foreach (CombinedNode item in Children) { int returnano = item.GetPosition(1 + pos, node); if (returnano > pos) { return(returnano); } } return(pos - 1); }
public bool Delete(CombinedNode node) { foreach (var child in Children) { if (child == node) { Children.Remove(child); return(true); } else { bool response = child.Delete(node); if (response) { return(true); } } } return(false); }