Augment all ancestors in the tree of vertex 'v'.

@param v the leaf to augment from
493592
private void augment(int v) {
        int n = buildPath(path, 0, v, NIL);
        for (int i = 2; i < n; i += 2) {
            matching.match(path[i], path[i - 1]);
        }
    }
896216
public void setVirtualNodes(java.util.Collection<VirtualNodeRef> virtualNodes) {
        if (virtualNodes == null) {
            this.virtualNodes = null;
            return;
        }

        this.virtualNodes = new java.util.ArrayList<VirtualNodeRef>(virtualNodes);
    }
738245
public void addVariable(VariableInitializer v) {
        assertNotNull(v);
        variables.add(v);
        v.setParent(this);
    }
931979
@Override
    public List<? extends Tree> getAncestors() {
        if ( getParent()==null ) return null;
        List<Tree> ancestors = new ArrayList<Tree>();
        Tree t = this;
        t = t.getParent();
        while ( t!=null ) {
            ancestors.add(0, t); // insert at start
            t = t.getParent();
        }
        return ancestors;
    }
337547
def ancestors(self, typename):
        """"""
        xs = []
        for parent in self._hier[typename][0]:
            xs.append(parent)
            xs.extend(self.ancestors(parent))
        return xs
343033
private static void expandAllRecursively(JTree tree, TreePath treePath)
    {
        TreeModel model = tree.getModel();
        Object lastPathComponent = treePath.getLastPathComponent();
        int childCount = model.getChildCount(lastPathComponent);
        if (childCount == 0)
        {
            return;
        }
        tree.expandPath(treePath);
        for (int i=0; i<childCount; i++)
        {
            Object child = model.getChild(lastPathComponent, i);
            int grandChildCount = model.getChildCount(child);
            if (grandChildCount > 0)
            {
                class LocalTreePath extends TreePath
                {
                    private static final long serialVersionUID = 0;
                    public LocalTreePath(
                        TreePath parent, Object lastPathComponent)
                    {
                        super(parent, lastPathComponent);
                    }
                }
                TreePath nextTreePath = new LocalTreePath(treePath, child);
                expandAllRecursively(tree, nextTreePath);
            }
        }
    }
1371058
function addTopicLine (topic, ancestor) {
    var
      ancestorTopic = ancestor.topic,
      additionalTopics = [];

    if (ancestorTopic !== topic) {
      // All of the generations to add seeded by the youngest existing ancestor
      additionalTopics = reduce(
        appendPrefixedTopic, [ancestorTopic],
        topic.substr(ancestorTopic.length).replace(/^\./, '').split('.')
      );
    }

    // Add a node to the tree for each new topic
    return addFamilyLine(
      addChildTopic, map(createNode, additionalTopics.slice(1)), ancestor
    );
  }
370873
@Override
  protected void visitExprNode(ExprNode node) {

    if (!(node instanceof ParentExprNode)) {
      return;
    }
    ParentExprNode nodeAsParent = (ParentExprNode) node;

    // Recurse.
    visitChildren(nodeAsParent);

    // If all children are constants, we attempt to preevaluate this node and replace it with a
    // constant.
    for (ExprNode child : nodeAsParent.getChildren()) {
      if (!isConstant(child)) {
        return; // cannot preevaluate
      }
    }
    attemptPreeval(nodeAsParent);
  }
1048010
public void setParent(Constituent v) {
    if (Constituent_Type.featOkTst && ((Constituent_Type)jcasType).casFeat_parent == null)
      jcasType.jcas.throwFeatMissing("parent", "de.julielab.jules.types.Constituent");
    jcasType.ll_cas.ll_setRefValue(addr, ((Constituent_Type)jcasType).casFeatCode_parent, jcasType.ll_cas.ll_getFSRef(v));}
657403
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            target.visit(v);
            for (AstNode arg : getArguments()) {
                arg.visit(v);
            }
            if (initializer != null) {
                initializer.visit(v);
            }
        }
    }
795447
private void preorderTreeDepth(INode root, HashMap<INode, Integer> order, HashMap<INode, Integer> depth) {
        order.clear();
        depth.clear();

        int num = 1;

        Deque<INode> stack = new ArrayDeque<INode>();
        stack.push(root);
        while (!stack.isEmpty()) {
            INode v = stack.pop();

            order.put(v, num++);
            if (!v.hasParent()) {
                depth.put(v, 0);
            } else {
                depth.put(v, depth.get(v.getParent()) + 1);
            }

            for (int i = v.getChildCount() - 1; i >= 0; i--) {
                stack.push(v.getChildAt(i));
            }
        }
    }
211073
public void adjustNodes(java.util.List<Address> v) {
        Node n;
        boolean removed=false;

        synchronized(nodes) {
            for(int i=0; i < nodes.size(); i++) {
                n=nodes.get(i);
                if(!v.contains(n.addr)) {
                    System.out.println("adjustNodes(): node " + n + " was removed");
                    nodes.remove(n);
                    removed=true;
                }
            }
            if(removed)
                repaint();
        }
    }
615640
private DefaultMutableTreeNode makeNode(Object userObject,
            MutableTreeNode parent) {

        DefaultMutableTreeNode node = new DefaultMutableTreeNode(userObject);

        if (parent != null) {
            treeModel.insertNodeInto(node, parent, parent.getChildCount());
        }

        return node;
    }
65507
@Override
    public void visit(NodeVisitor v) {
        if (v.visit(this)) {
            initializer.visit(v);
            condition.visit(v);
            increment.visit(v);
            body.visit(v);
        }
    }
429948
function ancestor(predicate, node) {
    while ((node = node.parent)) {
        if (predicate(node)) return true;
    }

    return false;
}
600091
function ancestorSearch (getValue, value, isAncestor, tree) {
    if (getValue(tree) === value) {
      return tree;
    }

    var index = binaryIndexBy(getValue, value, tree.children);
    var child1 = tree.children[index];
    var child0 = tree.children[index - 1];

    if (child1 && isAncestor(value, child1)) {
      return ancestorSearch(getValue, value, isAncestor, child1);
    }

    if (child0 && isAncestor(value, child0)) {
      return ancestorSearch(getValue, value, isAncestor, child0);
    }

    return tree;
  }
928791
public void setParent( IVarDef parent)
    {
    super.setParent( parent);

    // Reset ancestry for all descendants.
    if( members_ != null)
      {
      for( IVarDef member : members_)
        {
        member.setParent( this);
        }
      }
    }