Add a chain in this graph.
487246
def add_chain(self, *nodes, _input=BEGIN, _output=None, _name=None):
        
        if len(nodes):
            _input = self._resolve_index(_input)
            _output = self._resolve_index(_output)
            _first = None
            _last = None

            for i, node in enumerate(nodes):
                _last = self.add_node(node)
                if not i and _name:
                    if _name in self.named:
                        raise KeyError("Duplicate name {!r} in graph.".format(_name))
                    self.named[_name] = _last
                if _first is None:
                    _first = _last
                self.outputs_of(_input, create=True).add(_last)
                _input = _last

            if _output is not None:
                self.outputs_of(_input, create=True).add(_output)

            if hasattr(self, "_topologcally_sorted_indexes_cache"):
                del self._topologcally_sorted_indexes_cache

            return GraphRange(self, _first, _last)
        return GraphRange(self, None, None)
559053
void setChainUserIndex(int chain, int index, int value) {
		int i = getChainIndex_(chain);
		AttributeStreamOfInt32 stream = m_chainIndices.get(index);
		if (stream.size() <= i)
			stream.resize(m_chainData.size(), -1);

		stream.write(i, value);
	}
180078
private void add(final PathEdge edge) {
        int u = edge.either();
        int v = edge.other(u);
        if (rank[u] < rank[v])
            graph[u].add(edge);
        else
            graph[v].add(edge);
    }
871328
def _add_edge(self, s_a, s_b, **edge_labels):
        
        # Is that edge already in the graph ?
        # If at least one is new, then we are not redoing the same path again
        if (s_a, s_b) not in self.graph.edges():
            self.graph.add_edge(s_a, s_b, **edge_labels)
            self._new = True
            l.info("New edge: %s --> %s", s_a, s_b)
497834
def daisy_chain_graph(self):
        
        g = networkx.DiGraph()
        for x in self.get_monomers():
            for h in x.hole:
                g.add_edge(x.knob, h)
        return g
1017551
function LineChainData(chain, gl, numVerts, float32Allocator) {
  VertexArray.call(this, gl, numVerts, float32Allocator);
  this._chain = chain;
}
1267664
function addConnectedEdges(node) {
    var edges = node._private.edges;

    for (var i = 0; i < edges.length; i++) {
      add(edges[i]);
    }
  }
808300
def addRelation(self, link):
        '''
        
        '''
        if isinstance(link, Relation):
            self.internalLinks.append(link)
        else:
            raise TypeError(
                'link Type should be InternalLink, not %s' % type(link))
994155
function addGraph (g1, g2) {
  eachEdge(g2, function (from, to, data) {
    addEdge(g1, from, to, data)
  })
  return g1
}
1035894
def addLink(self, node1, node2, capacity, delay):
        '''
        
        '''
        for n in (node1, node2):
            if not self.__nxgraph.has_node(n):
                raise Exception("No node {} exists for building a link".format(n))
        macs = [None,None]
        if self.__auto_macs:
            for i in range(len(macs)):
                macstr = '{:012x}'.format(self.__ifnum)
                self.__ifnum += 1
                macaddr = ':'.join([ macstr[j:(j+2)] for j in range(0,len(macstr),2)])
                macs[i] = macaddr
        node1if = self.__nxgraph.node[node1]['nodeobj'].addInterface(ethaddr=macs[0])
        node2if = self.__nxgraph.node[node2]['nodeobj'].addInterface(ethaddr=macs[1])
        self.__nxgraph.add_edge(node1, node2)
        self.__nxgraph[node1][node2][node1] = node1if
        self.__nxgraph[node1][node2][node2] = node2if
        self.setLinkCharacteristics(node1, node2, capacity, delay)
598274
def add_graph_copy(self, graph, tags=None):
    """"""
    with graph.as_default():
      # Remove default attrs so that Modules created by a tensorflow version
      # with ops that have new attrs that are left to their default values can
      # still be loaded by older versions unware of those attributes.
      meta_graph = tf_v1.train.export_meta_graph(strip_default_attrs=True)
      _export_tags(meta_graph, tags)
      _export_signatures(meta_graph)
      _export_module_attachments(meta_graph)
    self._proto.meta_graphs.extend([meta_graph])
936738
def add(self, schema, data):
        
        binding = self.get_binding(schema, data)
        uri, triples = triplify(binding)
        for triple in triples:
            self.graph.add(triple)
        return uri
354664
private void addModuleToGraph(final DbModule module, final AbstractGraph graph, final int depth) {
        if (graph.isTreated(graph.getId(module))) {
            return;
        }

        final String moduleElementId = graph.getId(module);
        graph.addElement(moduleElementId, module.getVersion(), depth == 0);

        if (filters.getDepthHandler().shouldGoDeeper(depth)) {
            for (final DbDependency dep : DataUtils.getAllDbDependencies(module)) {
                if(filters.shouldBeInReport(dep)){
                    addDependencyToGraph(dep, graph, depth + 1, moduleElementId);
                }
            }
        }
    }
150322
function addNodeToGraph(node){

    gNodesDisplayed.push(node);
    g.addNode(node._id, node);


    if (contains(childrenNodes, node._id)){
        var parentNode = getNodeFromId(nodesToBeLinked[node._id].from);
        if (contains(gNodesDisplayed, parentNode)){
            addLinkToParent(node._id, parentNode._id);
        }
    }
}
603385
def add_outward_edge(self, v, e):
        
        self.add_vertex(v)
        self.graph.add_vertex(e)
        self.es.add(e)
        self.graph.add_edge(e, v)
1348039
private void add(Cycle cycle) {
        if (cycle.length() <= limit) cycles.put(cycle.length(), cycle);
    }
581744
def add_chain_ids(self, chains):
        
        chains = ssbio.utils.force_list(chains)

        for c in chains:
            if self.chains.has_id(c):
                log.debug('{}: chain already present'.format(c))
            else:
                chain_prop = ChainProp(ident=c, pdb_parent=self.id)
                self.chains.append(chain_prop)
                log.debug('{}: added to chains list'.format(c))