/** * @return a new OrdinalSet instances * @throws IllegalArgumentException if A is null */ public static <T> OrdinalSet<T> intersect(OrdinalSet<T> A, OrdinalSet<T> B) { if (A == null) { throw new IllegalArgumentException("A is null"); } if (A.size() != 0 && B.size() != 0) { assert A.mapping.equals(B.mapping); } if (A.S == null || B.S == null) { return new OrdinalSet<>(null, A.mapping); } IntSet isect = A.S.intersection(B.S); return new OrdinalSet<>(isect, A.mapping); }
/** * @return a new OrdinalSet instances * @throws IllegalArgumentException if A is null */ public static <T> OrdinalSet<T> intersect(OrdinalSet<T> A, OrdinalSet<T> B) { if (A == null) { throw new IllegalArgumentException("A is null"); } if (A.size() != 0 && B.size() != 0) { assert A.mapping.equals(B.mapping); } if (A.S == null || B.S == null) { return new OrdinalSet<>(null, A.mapping); } IntSet isect = A.S.intersection(B.S); return new OrdinalSet<>(isect, A.mapping); }
/** * @return a new OrdinalSet instances * @throws IllegalArgumentException if A is null */ public static <T> OrdinalSet<T> intersect(OrdinalSet<T> A, OrdinalSet<T> B) { if (A == null) { throw new IllegalArgumentException("A is null"); } if (A.size() != 0 && B.size() != 0) { assert A.mapping.equals(B.mapping); } if (A.S == null || B.S == null) { return new OrdinalSet<>(null, A.mapping); } IntSet isect = A.S.intersection(B.S); return new OrdinalSet<>(isect, A.mapping); }
@Override public IntSet getPredNodeNumbers(CGNode node) { if (!keep.contains(node)){ return null; } IntSet tmp = cg.getPredNodeNumbers(node); BitVectorIntSet kp = new BitVectorIntSet(); for (CGNode n : keep) { if (!removedEdge(n, node)) { kp.add(getNumber(n)); } } return tmp.intersection(kp); }
@Override public IntSet getSuccNodeNumbers(CGNode node) { if (!keep.contains(node)){ return null; } IntSet tmp = cg.getSuccNodeNumbers(node); BitVectorIntSet kp = new BitVectorIntSet(); for (CGNode n : keep) { if (!removedEdge(node, n)) { kp.add(getNumber(n)); } } return tmp.intersection(kp); }
@Override public IntSet getPredNodeNumbers(CGNode node) { if (!keep.contains(node)){ return null; } IntSet tmp = cg.getPredNodeNumbers(node); BitVectorIntSet kp = new BitVectorIntSet(); for (CGNode n : keep) { if (!removedEdge(n, node)) { kp.add(getNumber(n)); } } return tmp.intersection(kp); }
@Override public IntSet getSuccNodeNumbers(CGNode node) { if (!keep.contains(node)){ return null; } IntSet tmp = cg.getSuccNodeNumbers(node); BitVectorIntSet kp = new BitVectorIntSet(); for (CGNode n : keep) { if (!removedEdge(node, n)) { kp.add(getNumber(n)); } } return tmp.intersection(kp); }
final IntSet vlhs = bv.getValue(); if (vlhs != null) { intersect = intersect.intersection(vlhs);
final IntSet vlhs = bv.getValue(); if (vlhs != null) { intersect = intersect.intersection(vlhs);
final IntSet vlhs = bv.getValue(); if (vlhs != null) { intersect = intersect.intersection(vlhs);