Returns all minimal edge covers of the set of evil edges.
487280
def _compute_all_deletions(self):
        
        minimum_evil = []
        for disabled_qubits in map(set, product(*self._evil)):
            newmin = []
            for s in minimum_evil:
                if s < disabled_qubits:
                    break
                elif disabled_qubits < s:
                    continue
                newmin.append(s)
            else:
                minimum_evil = newmin + [disabled_qubits]
        return minimum_evil
815844
def get_vert_opposites_per_edge(mesh_v, mesh_f):
    """"""
    result = {}
    for f in mesh_f:
        for i in range(3):
            key = [f[i], f[(i+1)%3]]
            key.sort()
            key = tuple(key)
            val = f[(i+2)%3]

            if key in result:
                result[key].append(val)
            else:
                result[key] = [val]
    return result
609972
private Map<String, Integer> getHypotheses(Collection<KamEdge> edges) {
        Map<String, Integer> controlCountMap =
                getTranscriptionalControls(edges);
        Map<String, Integer> hypCountMap = new HashMap<String, Integer>();
        for (String hyp : controlCountMap.keySet()) {
            if (controlCountMap.get(hyp) >= 4) {
                hypCountMap.put(hyp, controlCountMap.get(hyp));
            }
        }
        return hypCountMap;
    }
462167
def edges
      result = []
      c = edge_class
      each_edge { |u,v| result << c.new(u,v) }
      result
    end
659204
public static <V> Set<V> getOutgoingVertices(DirectedGraph<V, DefaultEdge> graph, V source) {
        Set<DefaultEdge> edges = graph.outgoingEdgesOf(source);
        Set<V> targets = new LinkedHashSet<V>();
        for (DefaultEdge edge : edges) {
            targets.add(graph.getEdgeTarget(edge));
        }
        return targets;
    }
1280701
public static <V> Set<V> getIncomingVertices(DirectedGraph<V, DefaultEdge> graph, V target) {
        Set<DefaultEdge> edges = graph.incomingEdgesOf(target);
        Set<V> sources = new LinkedHashSet<V>();
        for (DefaultEdge edge : edges) {
            sources.add(graph.getEdgeSource(edge));
        }
        return sources;
    }
1018190
def minimum(self):
        
        return min([(x, energy) for _, x, energy, _, _ in self.get_kinks()],
                   key=lambda i: i[1])
904484
public List<BlockEdge<S, L>> getOutgoingEdges(Block<S, L> block) {
        return Arrays.asList(edges[block.getId()]);
    }
501731
def edges(self, sites, permutation=None, input='sites'):
        
        if input == 'sites':
            coords = [site.coords for site in sites]
        elif input == 'coords':
            coords = sites
        # if permutation is None:
        #     coords = [site.coords for site in sites]
        # else:
        #     coords = [sites[ii].coords for ii in permutation]
        if permutation is not None:
            coords = [coords[ii] for ii in permutation]
        return [[coords[ii] for ii in e] for e in self._edges]
822396
def generate_code_cover(self):
        

        lst = []
        for cfg_node in self.graph.nodes():
            size = cfg_node.size
            lst.append((cfg_node.addr, size))

        lst = sorted(lst, key=lambda x: x[0])
        return lst
673722
def edge_list(self) -> List[Edge]:
        
        return [edge for edge in sorted(self._edges.values(), key=attrgetter("key"))]
1320308
def p_edgesigs(self, p):
        ''
        p[0] = p[1] + (p[3],)
        p.set_lineno(0, p.lineno(1))
857181
public Graph<K, VV, EV> removeEdges(List<Edge<K, EV>> edgesToBeRemoved) {

		DataSet<Edge<K, EV>> newEdges = getEdges().coGroup(this.context.fromCollection(edgesToBeRemoved))
				.where(0, 1).equalTo(0, 1).with(new EdgeRemovalCoGroup<>()).name("Remove edges");

		return new Graph<>(this.vertices, newEdges, context);
	}
1284457
def masked_neighborhoods(self,seq,flanksize):
        
        ns = self.seq_neighborhoods(seq,flanksize)
        return [self.mask_seq(n) for n in ns]
12762
private List<Filter<S>> findCoveringMatches() {
        List<Filter<S>> coveringFilters = null;

        boolean check = !mRemainderFilters.isEmpty()
            && (mIdentityFilters.size() > 0
                || mRangeStartFilters.size() > 0 
                || mRangeEndFilters.size() > 0);

        if (check) {
            // Any remainder property which is provided by the index is a covering match.
            for (Filter<S> subFilter : mRemainderFilters) {
                if (isProvidedByIndex(subFilter)) {
                    if (coveringFilters == null) {
                        coveringFilters = new ArrayList<Filter<S>>();
                    }
                    coveringFilters.add(subFilter);
                }
            }
        }

        return prepareList(coveringFilters);
    }
527638
@Override
  public Set<EndpointPair<N>> edges() {
    return new AbstractSet<EndpointPair<N>>() {
      @Override
      public UnmodifiableIterator<EndpointPair<N>> iterator() {
        return EndpointPairIterator.of(AbstractGraph.this);
      }

      @Override
      public int size() {
        return Ints.saturatedCast(edgeCount());
      }

      @Override
      public boolean contains(@Nullable Object obj) {
        if (!(obj instanceof EndpointPair)) {
          return false;
        }
        EndpointPair<?> endpointPair = (EndpointPair<?>) obj;
        return isDirected() == endpointPair.isOrdered()
            && nodes().contains(endpointPair.nodeU())
            && successors(endpointPair.nodeU()).contains(endpointPair.nodeV());
      }
    };
  }
864812
def closed_sets(C, mincount_connectivity=0):
    
    n = np.shape(C)[0]
    S = connected_sets(C, mincount_connectivity=mincount_connectivity, strong=True)
    closed = []
    for s in S:
        mask = np.zeros(n, dtype=bool)
        mask[s] = True
        if C[np.ix_(mask, ~mask)].sum() == 0:  # closed set, take it
            closed.append(s)
    return closed