Adds a <i>potentially</i> fused cycle. If the cycle is discovered not be
fused it will still be added as isolated.

@param cycle vertex set of a potentially fused cycle, indicated by the
set bits
549471
private void addFused(long cycle) {

        // find index of first fused cycle
        int i = indexOfFused(0, cycle);

        if (i != -1) {

            // include the new cycle vertices and mark as fused
            cycles.set(i, cycle | cycles.get(i));
            fused.set(i, Boolean.TRUE);

            // merge other cycles we are share an edge with
            int j = i;
            while ((j = indexOfFused(j + 1, cycles.get(i))) != -1) {
                cycles.set(i, cycles.remove(j) | cycles.get(i));
                fused.remove(j);
                j--; // removed a vertex, need to move back one
            }
        } else {
            // edge disjoint
            addIsolated(cycle);
        }
    }
912871
public void add(final ObjectSinkNode node) {
        if ( this.firstNode == null ) {
            this.firstNode = node;
            this.lastNode = node;
        } else {
            this.lastNode.setNextObjectSinkNode( node );
            node.setPreviousObjectSinkNode( this.lastNode );
            this.lastNode = node;
        }
        this.size++;
    }
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);
            }
        }
    }
434319
public void addEdge(Edge e) {

		if (!containsNode(e.getFromNodeId())) {
			throw new NodeNotFoundException(e.getFromNodeId());
		}
		
		if (!containsNode(e.getToNodeId())) {
			throw new NodeNotFoundException(e.getToNodeId());
		}

		if (this.containsEdge(e.getId()))
			throw new DuplicatedEdgeException(e.getId());

		int eIndex = nextEdgeId++;

		edgeIdMapping.put(e.getId(), eIndex);

		int aliveIndex = eIndex >> 5;
		int aliveSubIndex = eIndex & 31;

		if (aliveIndex >= aliveEdges.size())
			aliveEdges.add(0);

		aliveEdges.set(aliveIndex, aliveEdges.get(aliveIndex) | (1 << aliveSubIndex));

		updateAdjacency(e, eIndex);
		
		edges.add(e);
		numberOfEdges++;
	}
872963
void addCombinableExecutionGraph(DStreamExecutionGraph combinableExecutionGraph){
		if (this.combinableExecutionGraphs == null){
			this.combinableExecutionGraphs = new ArrayList<>();
		}
		this.combinableExecutionGraphs.add(combinableExecutionGraph);
	}
1348039
private void add(Cycle cycle) {
        if (cycle.length() <= limit) cycles.put(cycle.length(), cycle);
    }
419146
private void topologicalSortVisit(V n, List<V> L, Set<V> visited, LinkedHashSet<V> sequence) throws CycleException, EX {
		//    if n has not been visited yet then
		//        mark n as visited
		if(visited.add(n)) {
			//        for each node m with an edge from n to m do
			for(Edge<V> e : (isForward ? graph.getEdgesFrom(n) : graph.getEdgesTo(n))) {
				V m = isForward ? e.getTo() : e.getFrom();
				//            visit(m)
				if(!sequence.add(m)) {
					List<V> vertices = new ArrayList<>();
					boolean found = false;
					for(V seq : sequence) {
						if(!found && seq.equals(m)) found = true;
						if(found) vertices.add(seq);
					}
					vertices.add(m);
					throw new CycleException(AoCollections.optimalUnmodifiableList(vertices));
				}
				topologicalSortVisit(m, L, visited, sequence);
				sequence.remove(m);
			}
			//        add n to L
			L.add(n);
		}
	}
1045145
def add_vertex(self, vertex):
        
        if vertex not in self._vertices:
            self._vertices.add(vertex)
            return True

        return False
1100211
public void add(Face vtx) {
        if (head == null) {
            head = vtx;
        } else {
            tail.next = vtx;
        }
        vtx.next = null;
        tail = vtx;
    }
1045659
@Override
	public void addEdge(Edge e) {
		
		addDirectionalEdge(e);
		
		if (e.isBidirectional())
			addDirectionalEdge(new Edge(e.getToNodeId(), e.getFromNodeId(), e.getWeight()));
	}
92612
private EdgeSet<T> addIfAbsent(int v) {
        S edges = getEdgeSet(v);
        if (edges == null) {
            edges = createEdgeSet(v);
            vertexToEdges.put(v, edges);
        }
        return edges;
    }
444422
def symmetry_cycles(self):
        """"""
        result = set([])
        for symmetry in self.symmetries:
            result.add(symmetry.cycles)
        return result
92052
public void addEdge(N a, N b)
    {
        if( !containsBoth(a, b) )
            return;//Cant add nodes to things that doing exist
        nodes.get(a).getOutgoing().add(b);
        nodes.get(b).getIncoming().add(a);
    }
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
414730
public void add(SingleImageRecord record) {
        if (records == null)
            records = new ArrayList<>();
        records.add(record);
    }
396483
public void appendNodes(NodeSet nodes)
  {

    int nNodes = nodes.size();

    if (null == m_map)
    {
      m_mapSize = nNodes + m_blocksize;
      m_map = new Node[m_mapSize];
    }
    else if ((m_firstFree + nNodes) >= m_mapSize)
    {
      m_mapSize += (nNodes + m_blocksize);

      Node newMap[] = new Node[m_mapSize];

      System.arraycopy(m_map, 0, newMap, 0, m_firstFree + nNodes);

      m_map = newMap;
    }

    System.arraycopy(nodes.m_map, 0, m_map, m_firstFree, nNodes);

    m_firstFree += nNodes;
  }
439423
public void appendNodes(NodeVector nodes)
  {

    if (!m_mutable)
      throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");

    super.appendNodes(nodes);
  }