Returns whether the node is the root of a segment.
Lians are always the root of a segment.

node cannot be null.

The result should discount any removingRule. That means it gives you the result as
if the rule had already been removed from the network.
540224
public static boolean isRootNode(LeftTupleNode node, TerminalNode removingTN) {
        return node.getType() == NodeTypeEnums.LeftInputAdapterNode || isNonTerminalTipNode( node.getLeftTupleSource(), removingTN );
    }
1139231
public static boolean isDepTree(int[] parents, boolean isProjective, boolean isSingleHeaded) {
        // Check that every token has some head. (Note that the parents array encoding ensures we
        // can't have multiple heads per token.)
        int emptyCount = ParentsArray.countChildrenOf(parents, ParentsArray.EMPTY_POSITION);
        if (emptyCount != 0) {
            return false;
        }
        // Check that there is exactly one node with the WALL as its parent
        int wallCount = ParentsArray.countChildrenOf(parents, ParentsArray.WALL_POSITION);
        if (isSingleHeaded && wallCount != 1) {
            return false;
        } else if (wallCount < 1) {
            return false;
        }

        // Check that there are no cyles
        if (!ParentsArray.isConnectedAndAcyclic(parents)) {
            return false;
        }

        // Check for projectivity if necessary
        if (isProjective) {
            if (!ParentsArray.isProjective(parents)) {
                return false;
            }
        }
        // Is a valid dependency tree.
        return true;
    }
862022
def find_root(self):
        """"""
        node = self
        while node.parent is not None:
            node = node.parent
        return node
447031
function isNodeInRoot(node, root) {
    node = ReactDOM.findDOMNode(node), root = ReactDOM.findDOMNode(root);
    return _isNodeInRoot(node, root);
}
525813
def dt(self, start_node=None):
        
        if start_node is None:
            return self.root2tree(start_node=start_node)

        elem_id = start_node
        if elem_id not in self.elem_dict:
            return []

        elem = self.elem_dict[elem_id]
        elem_type = elem['element_type']

        assert elem_type in ('segment', 'group')

        if elem_type == 'segment':
            return self.segment2tree(
                elem_id, elem, elem_type, start_node=start_node)

        else:
            return self.group2tree(
                elem_id, elem, elem_type, start_node=start_node)
127277
def visit_root(node, &operator)
      clear
      # Exclude cycles if the prune cycles flag is set. 
      @exclude.merge!(cyclic_nodes(node)) if @prune_cycle_flag 
      # Visit the root node.
      result = visit_recursive(node, &operator)
      # Reset the exclusions if the prune cycles flag is set.
      @exclude.clear if @prune_cycle_flag 
      result
    end
1008760
public function isDisconnected()
    {
        $parent = $this->getNode(0)->parentNode;
        return ($parent == null || $parent->tagName == self::FRAGMENT_ROOT_TAGNAME);
    }
1338532
private boolean isSegment(SNode currNode) {

    List<SRelation<SNode, SNode>> edges = currNode.getGraph().getOutRelations(currNode.getId());

    if (edges != null && edges.size() > 0) {
      for (SRelation<SNode, SNode> edge : edges) {
        if (edge.getTarget() instanceof SToken) {
          return true;
        }
      }
    }

    return false;
  }
679348
boolean isLeaf(treeNode node){

		if(node.lc == null && node.rc == null){
			return true;
		} else {
			return false;
		}

	}
1159892
public boolean isLeader() {
    MemberId leader = this.leader;
    return leader != null && leader.equals(cluster.getMember().memberId());
  }
378443
public boolean isInnerNode()
  {
    boolean inner = true;
    if ( (_leftChild  == null) ||
         (_rightChild == null) )
      inner = false;
    return inner;
  }
779693
def _root(self):
        
        _n = self
        while _n.parent:
            _n = _n.parent
        return _n
1117019
def is_child_of(self, node):
        
        return (self.path.startswith(node.path) and
                self.depth == node.depth + 1)
1363120
def is_descendant_of(self, node):
        
        return self.path.startswith(node.path) and self.depth > node.depth
146353
public boolean isCompleteExceptIgnoredNodes() {
        synchronized (nodeStack) {
            if (nodeStack.isEmpty() && retainedNodes.isEmpty()) {
                return true;
            } else {
                // Check that remaining nodes can be ignored
                for (int i=0; i < nodeStack.size(); i++) {
                    if (!ignoredNodes.contains(nodeStack.get(i))) {
                        return false;
                    }
                }
                for (int i=0; i < retainedNodes.size(); i++) {
                    if (!ignoredNodes.contains(retainedNodes.get(i))) {
                        return false;
                    }
                }
                return true;
            }
        }
    }
507986
def is_component(self, path):
        ''''''
        node = self.get_node(path)
        if not node:
            return False
        return node.is_component
1361943
function(node, root) {
    var pn = node.parentNode;
    while (pn) {
      if (pn == root) {
        break;
      }
      pn = pn.parentNode;
    }
    return !!pn;
  }