Mark root of this DAG depends on given DAG's root.

@param dependencyGraph the dependency DAG
556663
public void addDependencyGraph(DAGraph<DataT, NodeT> dependencyGraph) {
        this.rootNode.addDependency(dependencyGraph.rootNode.key());
        Map<String, NodeT> sourceNodeTable = dependencyGraph.nodeTable;
        Map<String, NodeT> targetNodeTable = this.nodeTable;
        this.merge(sourceNodeTable, targetNodeTable);
        dependencyGraph.parentDAGs.add(this);
        if (this.hasParents()) {
            this.bubbleUpNodeTable(this, new LinkedList<String>());
        }
    }
136466
public function addNode(DependencyNode $node)
    {
        if (!$this->dependencies->contains($node)) {
            $this->dependencies->attach($node, new ArrayObject());
            $this->nodes[] = $node;

            foreach ($node->getDependencies() as $depency) {
                $this->addDependency($node, $depency);
            }
        }
    }
450942
private void addDependent(String pathName, String relativeTo) {
        if (relativeTo != null) {
            Set<String> dependents = dependenctRelativePaths.get(relativeTo);
            if (dependents == null) {
                dependents = new HashSet<String>();
                dependenctRelativePaths.put(relativeTo, dependents);
            }
            dependents.add(pathName);
        }
    }
1046994
public void rebuildDependencyGraph() {
        DependencyGraph graph = new DependencyGraph();
        graph.build();
        // volatile acts a as a memory barrier here and therefore guarantees
        // that graph is fully build, before it's visible to other threads
        dependencyGraph = graph;
        dependencyGraphDirty.set(false);
    }
1037303
public static <T> void defineDependency(Class<T> clazz, T dependency) {
        defineDependency(clazz, null, dependency);
    }
76020
void markSuccess() {
    // It's possible that the dag is killed before this method is called.
    assertRunningOrKilling();
    changeStatus(Status.SUCCESS);
    for (final Node child : this.children) {
      child.runIfAllowed();
    }
    this.dag.updateDagStatus();
  }
205005
public void setRootComponent(final MvcComponent component) {
        if (uiThreadRunner.isOnUiThread()) {
            try {
                graph.setRootComponent(component);
            } catch (Graph.IllegalRootComponentException e) {
                throw new MvcGraphException(e.getMessage(), e);
            }
        } else {
            uiThreadRunner.post(new Runnable() {
                @Override
                public void run() {
                    try {
                        graph.setRootComponent(component);
                    } catch (Graph.IllegalRootComponentException e) {
                        throw new MvcGraphException(e.getMessage(), e);
                    }
                }
            });
        }
    }
1265018
public List<TreeGraphNode> getStanfordTreeGraphNodes(DependencyForm form) {
    	if (this.nodes != null) return this.nodes;
    	
        this.nodes = new ArrayList<TreeGraphNode>();
        // Add an explicit root node
        nodes.add(new TreeGraphNode(ROOT_LABEL));
        
        List<WordLemmaTag> labels = getStanfordWordLemmaTags();
        for (WordLemmaTag curToken : labels) {
            // Create the tree node
            TreeGraphNode treeNode = new TreeGraphNode(curToken);
            treeNode.label().setTag(curToken.tag());
            /**
             * Caution, the order to call is to first setWord(), then setlemma()
             * From the Stanford source code:
             *   
  public void setWord(String word) {
    set(WordAnnotation.class, word);
    // pado feb 09: if you change the word, delete the lemma.
    remove(LemmaAnnotation.class);
  }
  
    public void setLemma(String lemma) {
    set(LemmaAnnotation.class, lemma);
  }
              */
            treeNode.label().setWord(curToken.word());
            treeNode.label().setLemma(curToken.lemma());
            nodes.add(treeNode);
        }

        List<AgigaTypedDependency> agigaDeps = getAgigaDeps(form);
        for (AgigaTypedDependency agigaDep : agigaDeps) {
            // Add one, since the tokens are zero-indexed but the TreeGraphNodes are one-indexed
            TreeGraphNode gov = nodes.get(agigaDep.getGovIdx() + 1);
            TreeGraphNode dep = nodes.get(agigaDep.getDepIdx() + 1);

            // Add gov/dep to TreeGraph
            gov.addChild(dep);
            dep.setParent(gov);
            require(dep.parent() == gov);
        }

        return nodes;
    }
878854
private void addDependencyToGraph(final DbDependency dependency, final AbstractGraph graph, final int depth, final String parentId) {
        // In that case of Axway artifact we will add a module to the graph
        if (filters.getCorporateFilter().filter(dependency)) {
            final DbModule dbTarget = repoHandler.getModuleOf(dependency.getTarget());

            // if there is no module, add the artifact to the graph
            if(dbTarget == null){
                LOG.error("Got missing reference: " + dependency.getTarget());
                final DbArtifact dbArtifact = DataUtils.createDbArtifact(dependency.getTarget());
                final String targetElementId = graph.getId(dbArtifact);
                graph.addElement(targetElementId, dbArtifact.getVersion(), false);
                graph.addDependency(parentId, targetElementId, dependency.getScope());
                return;
            }

            // Add the element to the graph
            addModuleToGraph(dbTarget, graph, depth + 1);

            //Add the dependency to the graph
            final String moduleElementId = graph.getId(dbTarget);
            graph.addDependency(parentId, moduleElementId, dependency.getScope());
        }
        // In case a third-party we will add an artifact
        else {
            final DbArtifact dbTarget = repoHandler.getArtifact(dependency.getTarget());
            if(dbTarget == null){
                LOG.error("Got missing artifact: " + dependency.getTarget());
                return;
            }

            if(!graph.isTreated(graph.getId(dbTarget))){
                final ModelMapper modelMapper = new ModelMapper(repoHandler);
                final Artifact target = modelMapper.getArtifact(dbTarget);
                final String targetElementId = graph.getId(target);
                graph.addElement(targetElementId, target.getVersion(), false);
                graph.addDependency(parentId, targetElementId, dependency.getScope());
            }
        }
    }
95040
public void addDependency (T dependant, T dependee)
    {
        _orphans.remove(dependant);
        DependencyNode<T> dependantNode = _nodes.get(dependant);
        if (dependantNode == null) {
            throw new IllegalArgumentException("Unknown dependant? " + dependant);
        }
        DependencyNode<T> dependeeNode = _nodes.get(dependee);
        if (dependeeNode == null) {
            throw new IllegalArgumentException("Unknown dependee? " + dependee);
        }
        if (dependee == dependant || dependsOn(dependee, dependant)) {
            throw new IllegalArgumentException("Refusing to create circular dependency.");
        }
        dependantNode.parents.add(dependeeNode);
        dependeeNode.children.add(dependantNode);
    }
774436
def depends_on(options, **kwargs):
    
    include_graph = options['include_graph']

    include_graph.render('full_graph')

    result = None

    if 'graph' in kwargs:
        name = kwargs['graph']
        del kwargs['graph']

        result = _Result(kwargs)

        dep_graph = build_dependency_graph(include_graph, **kwargs)

        dep_graph.render(name)

        result.add_result("Rendered dep graph at {}".format(name))

    else:
        result = _Result(kwargs)

        dep_graph = build_dependency_graph(include_graph, **kwargs)

        for node, edges in dep_graph:
            if node not in kwargs:
                result.add_result(node)

    return result
320977
def _InitializeGraph(self, os_name, artifact_list):
    
    dependencies = artifact_registry.REGISTRY.SearchDependencies(
        os_name, artifact_list)
    artifact_names, attribute_names = dependencies

    self._AddAttributeNodes(attribute_names)
    self._AddArtifactNodesAndEdges(artifact_names)
313485
def pull_dependencies(self, nodes):
        """"""
        visitor = DependencyFinderVisitor()
        for node in nodes:
            visitor.visit(node)
        for dependency in 'filters', 'tests':
            mapping = getattr(self, dependency)
            for name in getattr(visitor, dependency):
                if name not in mapping:
                    mapping[name] = self.temporary_identifier()
                self.writeline('%s = environment.%s[%r]' %
                               (mapping[name], dependency, name))
1055264
def remove_dependency(self, p_from_todo, p_to_todo, p_leave_tags=False):
        
        dep_id = p_from_todo.tag_value('id')

        if dep_id:
            self._depgraph.remove_edge(hash(p_from_todo), hash(p_to_todo))
            self.dirty = True

        # clean dangling dependency tags
        if dep_id and not p_leave_tags:
            p_to_todo.remove_tag('p', dep_id)

            if not self.children(p_from_todo, True):
                p_from_todo.remove_tag('id')
                del self._parentdict[dep_id]
1058936
def _maintain_dep_graph(self, p_todo):
        
        dep_id = p_todo.tag_value('id')
        # maintain dependency graph
        if dep_id:
            self._parentdict[dep_id] = p_todo
            self._depgraph.add_node(hash(p_todo))

            # connect all tasks we have in memory so far that refer to this
            # task
            for dep in \
                    [dep for dep in self._todos if dep.has_tag('p', dep_id)]:

                self._add_edge(p_todo, dep, dep_id)

        for dep_id in p_todo.tag_values('p'):
            try:
                parent = self._parentdict[dep_id]
                self._add_edge(parent, p_todo, dep_id)
            except KeyError:
                pass
19434
public void addDependency(org.sonatype.aether.graph.Dependency aetherDep) {
        Artifact artifact = aetherDep.getArtifact();

        Dependency dependency = new Dependency();
        dependency.setGroupId( artifact.getGroupId() );
        dependency.setArtifactId( artifact.getArtifactId() );
        dependency.setType( artifact.getExtension() );
        dependency.setVersion( artifact.getVersion() );
        dependency.setScope( aetherDep.getScope() );
        addDependency( dependency );
    }
191603
@Override
    public Collection<AgentProjectInfo> collectDependencies(String rootDirectory) {
        this.rootDirectory = rootDirectory;
        Collection<DependencyInfo> dependencies = new LinkedList<>();
        // check if paket group is not ignored & it has dependencies
        if (paketIgnoredGroups == null || !Arrays.asList(paketIgnoredGroups).contains(getGroupName().toLowerCase())) {
            if (!this.directDependenciesNames.isEmpty()) {
                List<String> groupLines = getGroupDependenciesFromPaketLock();
                for (String dependencyName : this.directDependenciesNames) {
                    DependencyInfo dependency = new DependencyInfo();
                    dependency.setGroupId(dependencyName);
                    dependency.setChildren(collectChildrenDependencies(dependency, groupLines));
                    if(dependency.getSha1() == null && dependency.getArtifactId() == null) {
                        logger.warn(DEPENDECYERROR, dependency.getGroupId());
                    } else {
                        dependencies.add(dependency);
                    }
                }
            }
        }
        return getSingleProjectList(dependencies);
    }