public KBDAST(int id, int command, List <int> tokens) { this.id = id; this.command = command; this.tokens = new List <int>(tokens); cant_nodes_in = 0; cant_nodes_next = 0; inside = null; next = null; }
public void SetInsideSubTree(KBDAST inside) { this.inside = inside; this.cant_nodes_in = inside.cant_nodes_next + inside.cant_nodes_in + 1; this.inside.parent = this; }
public void SetNextSubTree(KBDAST next) { this.next = next; this.cant_nodes_next = next.cant_nodes_in + next.cant_nodes_next + 1; this.next.parent = this; }