Gets the minimum value node, rooted in a particular node.

@private
@param {Node} root The node to search.
@return {Node} The node with the minimum key in the tree.
341228
function minValueNode(root) {
  var current = root;
  while (current.left) {
    current = current.left;
  }
  return current;
}
199353
protected boolean minimizeLit(final int root) {
        assert marked(root) != 0;
        CLClause reason = var(root).reason();
        if (reason == null) { return false; }
        final int oldSeenSize = this.seen.size();
        int nextSeen = oldSeenSize;
        boolean res = true;
        int lit = root;
        while (true) {
            int other;
            for (int p = 0; res && p < reason.lits().size(); p++) {
                other = reason.lits().get(p);
                if (other == lit) { continue; }
                assert val(other) == VALUE_FALSE;
                if (marked(other) != 0) { continue; }
                final CLVar v = var(other);
                if (v.reason() == null) { res = false; } else if (!this.control.get(v.level()).mark()) {
                    res = false;
                } else { mark(other); }
            }
            if (!res || nextSeen == this.seen.size()) { break; }
            lit = -this.seen.get(nextSeen++);
            reason = var(lit).reason();
            assert reason != null;
        }
        if (!res) { unmark(oldSeenSize); }
        return res;
    }
33657
function(node) {
    var index = '';
    do {
      if (node.id) index = '[' + node.position + ']' + index;
    } while ((node = node.parent) != null);
    return index;
  }
1143809
public Node getRoot(Node node)
  {

    Node root = null;

    while (node != null)
    {
      root = node;
      node = getParentOfNode(node);
    }

    return root;
  }
13340
private Node getParentNode(Node node) {

		if (node == null || node == root)
			return null;

		Node newNode = node.getParentNode();
		if (newNode == null)
			return null;

		int accept = acceptNode(newNode);

		if (accept == NodeFilter.FILTER_ACCEPT)
			return newNode;
		else
			// if (accept == NodeFilter.SKIP_NODE)
			// and REJECT too.
			return getParentNode(newNode);

	}
605423
function  (node) {
		  	var parent = node.parentNode,
			  	path = [],
			  	index = this.getChildIndex(node);

		  if(parent && (path = this.getNodePath(parent))){
			   if(index > -1){
				   path.push(index);
			   }
		  }
		  return path;
		}
1174769
function(node, l, b, r, t)
{
    return (max(node.bb_r, r) - min(node.bb_l, l))*(max(node.bb_t, t) - min(node.bb_b, b));
}
964740
function getRootNode (host) {
  if (isRootNode(host)) {
    return host;
  }

  if (!host.parentNode) {
    return;
  }

  return getRootNode(host.parentNode);
}
624161
public Node root() {
        Node node = this;
        while (node.parentNode != null)
            node = node.parentNode;
        return node;
    }
320731
public static Node searchNodeById(Node rootNode, int nodeId) {
        if (rootNode.getNodeId() == nodeId) {
            return rootNode;
        }
        Node foundNode = null;
        for (Node n : rootNode.getChilds()) {
            foundNode = searchNodeById(n, nodeId);
            if (foundNode != null) {
                break;
            }
        }
        return foundNode;
    }
447031
function isNodeInRoot(node, root) {
    node = ReactDOM.findDOMNode(node), root = ReactDOM.findDOMNode(root);
    return _isNodeInRoot(node, root);
}
862022
def find_root(self):
        """"""
        node = self
        while node.parent is not None:
            node = node.parent
        return node
687214
def lowest_common_ancestor(root, p, q):
    
    while root:
        if p.val > root.val < q.val:
            root = root.right
        elif p.val < root.val > q.val:
            root = root.left
        else:
            return root
962238
function (value) {
            var ret = false;
            var root = this.__root;
            while (root != null) {
                var cmp = this.compare(value, root.data);
                if (cmp) {
                    root = root[(cmp === -1) ? "left" : "right"];
                } else {
                    ret = true;
                    root = null;
                }
            }
            return ret;
        }
775960
function getAncestor (node, root, validate) {
  while (node.parent) {
    node = node.parent
    if (validate(node)) {
      return node
    }
    if (node === root) {
      break
    }
  }
  return null
}
517633
public static TreeElement getRoot(TreeElement node)
    {
        TreeElement parentNode = node.getParent();
        while (parentNode != null) {
            node = parentNode;
            parentNode = node.getParent();
        }
        return node;
    }
831268
function layoutNode (root) {
  var rootNode = createNode(root);
  computeLayout(rootNode);
  walkNode(rootNode);
  return rootNode;
}