Add the cycle vertices to our discovered cycles. The cycle is first
checked to see if it is isolated (shares at most one vertex) or
<i>potentially</i> fused.

@param cycle newly discovered cyclic vertex set
322585
private void add(BitSet cycle) {

        BitSet intersect = and(cycle, cyclic);

        if (intersect.cardinality() > 1) {
            addFused(cycle);
        } else {
            addIsolated(cycle);
        }

        cyclic.or(cycle);

    }
491433
def add_vertex(self, v):
        
        self.graph.add_vertex(v)
        self.vs.add(v)
685600
private static <T> void addDependencies(final Vertex<T> vertex, final List<Vertex<T>> vertices)
    {
        if (!vertices.contains(vertex))
        {
            vertices.add(vertex);

            for (Vertex<T> v : vertex.getDependencies())
            {
                addDependencies(v, vertices);
            }
        }
    }
316782
public void add(Component component, boolean addRelationships) {
        if (component != null) {
            if (!component.getContainer().equals(getContainer())) {
                throw new IllegalArgumentException("Only components belonging to " + container.getName() + " can be added to this view.");
            }

            addElement(component, addRelationships);
        }
    }
1068311
public void add(ImprintNode... nodes) throws HashException {
        notNull(nodes, "Nodes");
        for (ImprintNode node : nodes) {
            add(node);
        }
    }
193179
public void addEdge(int from, int to) {
        Set<Integer> outEdges = edges.get(from);
        if (outEdges == null) {
            outEdges = new TreeSet<Integer>();
            edges.put(from, outEdges);
        }
        outEdges.add(to);
    }
756313
def detect_cycle(graph):
    

    visited_nodes = set()

    for node in list(graph):
        if node not in visited_nodes:
            cycle = _dfs_cycle_detect(graph, node, [node], visited_nodes)
            if cycle:
                return cycle
    return None
735400
public void addEdge(final Collection<HypergraphNode<T>> nodes) {
    final HypergraphEdge<T> edge = new HypergraphEdge<>(nodes);
    this.nodes.addAll(nodes);
    this.edges.add(edge);
  }
940875
public void addVertex(Vertex vertex)
	{
		if (!name.equals(vertex.baseName()))
			return;

		vertexes.add(vertex);
	}
1149000
def add_subgraph(self, sgraph):
        

        if not isinstance(sgraph, Subgraph) and not isinstance(sgraph, Cluster):
            raise TypeError('add_subgraph() received a non subgraph class object:' + str(sgraph))
            
        if self.obj_dict['subgraphs'].has_key(sgraph.get_name()):
        
            sgraph_list = self.obj_dict['subgraphs'][ sgraph.get_name() ]
            sgraph_list.append( sgraph.obj_dict )
                
        else:
            self.obj_dict['subgraphs'][ sgraph.get_name() ] = [ sgraph.obj_dict ]
         
        sgraph.set_sequence( self.get_next_sequence_number() )
        
        sgraph.set_parent_graph( self.get_parent_graph() )
446950
public void addCc(String cc) {
        if (this.cc.length() > 0) {
            this.cc.append(",");
        }
        this.cc.append(cc);
    }
357031
def add_vertex(self, v, partition):
        
        self.graph.add_vertex(v)
        self.partitions[partition].add(v)
1131544
public void add(final WComponent component, final Serializable... constraints) {
		add(component);

		if (constraints != null && constraints.length > 0) {
			PanelModel model = getOrCreateComponentModel();

			if (model.layoutConstraints == null) {
				model.layoutConstraints = new HashMap<>();
			}

			model.layoutConstraints.put(component, constraints);
		}
	}
522551
public void add(final LeftTupleSinkNode node) {
        if ( this.firstNode == null ) {
            this.firstNode = node;
            this.lastNode = node;;
        } else {
            this.lastNode.setNextLeftTupleSinkNode( node );
            node.setPreviousLeftTupleSinkNode( this.lastNode );
            this.lastNode = node;
        }
        this.size++;
    }
842389
def merge_cycles(self):
      """"""
      while True:
         ### remove any self edges
         own_edges = self.get_self_edges()
         if len(own_edges) > 0:
            for e in own_edges: self.remove_edge(e)
         c = self.find_cycle()
         if not c: return
         keep = c[0]
         remove_list = c[1:]
         for n in remove_list: self.move_edges(n,keep)
         for n in remove_list: keep.payload_list += n.payload_list
         for n in remove_list: self.remove_node(n)
767570
public void add(MultiVertexGeometryImpl src, int beginIndex, int endIndex) {
		int endIndexC = endIndex < 0 ? src.getPointCount() : endIndex;
		if (beginIndex < 0 || beginIndex > src.getPointCount()
				|| endIndexC < beginIndex)
			throw new IllegalArgumentException();

		if (beginIndex == endIndexC)
			return;

		mergeVertexDescription(src.getDescription());
		int count = endIndexC - beginIndex;
		int oldPointCount = m_pointCount;
		resize(m_pointCount + count);
		_verifyAllStreams();
		for (int iattrib = 0, nattrib = src.getDescription()
				.getAttributeCount(); iattrib < nattrib; iattrib++) {
			int semantics = src.getDescription()._getSemanticsImpl(iattrib);
			int ncomps = VertexDescription.getComponentCount(semantics);
			AttributeStreamBase stream = getAttributeStreamRef(semantics);
			AttributeStreamBase srcStream = src
					.getAttributeStreamRef(semantics);
			stream.insertRange(oldPointCount * ncomps, srcStream, beginIndex
					* ncomps, count * ncomps, true, 1, oldPointCount * ncomps);
		}
	}
229631
protected void initializeGraph() {
        mGraph = new Graph(getContext());
        addView(mGraph);

        mGraphOverlay = new GraphOverlay(getContext());
        addView(mGraphOverlay);

        mLegend = new Legend(getContext());
        addView(mLegend);
    }