Get the highest ancestor {@link MultiVariable} of this {@link Variable} (root of the variable hierarchy).
@return The root of this {@link Variable}'s variable hierarchy.
509587
public MultiVariable getRootVariable() {
		Variable aux = this;
		while (aux.getParentVariable() != null) {
			aux = aux.getParentVariable();
		}
		return (MultiVariable)aux;
	}
578481
public V getVar(String name) {
    ImplicitVar implicit = name != null ? ImplicitVar.of(name) : null;
    if (implicit != null) {
      return getImplicitVar(implicit, true);
    }
    S scope = thisScope();
    while (scope != null) {
      V var = scope.getOwnSlot(name);
      if (var != null) {
        return var;
      }
      // Recurse up the parent Scope
      scope = scope.getParent();
    }
    return null;
  }
748382
public Factor getRootFactor(ExpressionTree tree, VariableNumMap expressionVar) {
    List<Assignment> roots = Lists.newArrayList();
    if (tree.getSubstitutions().size() == 0) {
      roots.add(expressionVar.outcomeArrayToAssignment(tree.getExpressionNode()));
    } else {
      for (ExpressionTree substitution : tree.getSubstitutions()) {
        roots.add(expressionVar.outcomeArrayToAssignment(substitution.getExpressionNode()));
      }
    }

    return TableFactor.pointDistribution(expressionVar, roots.toArray(new Assignment[0]));
  }
581765
public LocalVariable findVariable(String name, int depth) {
        LocalVariable variable = localVariables.get(name);

        if (variable != null) {
            // Destined scope need adjusted variable since it need to know how deep to look for it.
            if (depth != 0) {
                return new LocalVariable(name, variable.getOffset(), depth);
            }

            return variable;
        }

        if (parent != null) {
            return parent.findVariable(name, depth + 1);
        }

        return null;
    }
754386
@Nullable
  public UnixPath getParent() {
    if (path.isEmpty() || isRoot()) {
      return null;
    }
    int index =
        hasTrailingSeparator()
            ? path.lastIndexOf(SEPARATOR, path.length() - 2)
            : path.lastIndexOf(SEPARATOR);
    if (index == -1) {
      return isAbsolute() ? ROOT_PATH : null;
    } else {
      return new UnixPath(permitEmptyComponents, path.substring(0, index + 1));
    }
  }
585029
public HashMap<Variable,Object> chooseValues() {
		MultiVariable mv = (MultiVariable)myVariable;
		Variable[] internalVars = mv.getInternalVariables();
		HashMap<Variable,Object> values = new HashMap<Variable,Object>();
		for (Variable v: internalVars) {
			if (v instanceof MultiVariable) {
				MultiVariable nestedMv = (MultiVariable)v;
				MultiDomain nestedMd = nestedMv.getDomain();
				HashMap<Variable,Object> nested = nestedMd.chooseValues();
				for (Entry<Variable,Object> e : nested.entrySet()) {
					values.put(e.getKey(), e.getValue());
				}
			}
			else {
				values.put(v,v.getDomain().chooseValue());
			}
		}
		return values;
	}
239046
function getChildVariable() {
            var indexArr = this.options.rowIndex.split('.');
            var lastIndex = indexArr[indexArr.length - 1];
            var fieldArr = this.options.field.split('.');
            var lastField = fieldArr[fieldArr.length - 1];
            var lastDataTable = this.dataModel;
            var lastRow = null;

            for (var i = 0; i < fieldArr.length; i++) {
                lastRow = lastDataTable.getRow(indexArr[i]);
                if (!lastRow) break;
                if (i < fieldArr.length - 1) {
                    lastDataTable = lastRow.getValue(fieldArr[i]);
                }
            }
            return {
                lastField: lastField,
                lastIndex: lastIndex,
                lastDataTable: lastDataTable,
                lastRow: lastRow
            };
        }
142339
public final int getVariableByName(String variableName) {
    int index = getVariableIndex(variableName);
    if (index == -1) {
      return index;
    } else {
      return nums[index];
    }
  }
674027
@SuppressWarnings( "unchecked" )
    public <V> Key<V> getRoot() {
        if ( this.getParent() == null ) {
            return (Key<V>) this;
        } else {
            return this.getParent().getRoot();
        }
    }
1143809
public Node getRoot(Node node)
  {

    Node root = null;

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

    return root;
  }
769488
public String getLevel() {
        try {
            LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
            return loggerContext.getLogger("root").getLevel().toString();
        } catch (Exception e) {
            e.printStackTrace();
            return "";
        }
    }
918326
public final int getMaxArity() {
    Node params = getParametersNode();
    if (params != null) {
      Node lastParam = params.getLastChild();
      if (lastParam == null || !lastParam.isVarArgs()) {
        return params.getChildCount();
      }
    }

    return Integer.MAX_VALUE;
  }
1134956
public Throwable getRootCause() {
		
		Throwable rootCause = null;
		Throwable nextCause = getCause();
		
		while (nextCause != null && !nextCause.equals(rootCause)) {
			rootCause = nextCause;
			nextCause = nextCause.getCause();
		}
		
		return rootCause;
	}
160125
public Map getRootData() {
		for (Scope cur=this; true; cur=cur.parent) {
			if (cur.parent == null) {
				return cur.data;
			}
		}
	}
280511
@Override
    public Tree getAncestor(int ttype) {
        Tree t = this;
        t = t.getParent();
        while ( t!=null ) {
            if ( t.getType()==ttype ) return t;
            t = t.getParent();
        }
        return null;
    }
1044837
function getRootId(node) {
    var ancestor = node;
    while (ancestor.depth > 1) {
        ancestor = ancestor.parentNode;
    }

    var virtualRoot = node.getAncestors()[0];
    return zrUtil.indexOf(virtualRoot.children, ancestor);
}
1247834
public Map<String, Object> getVariables() {
    final HashMap<String, Object> map = new HashMap<String, Object>();
    if (inherited != null)
      map.putAll(inherited.getVariables());
    if (variables != null)
      map.putAll(variables);
    return map;
  }