/** * Return a new FixedSizeBitVector as the OR of two others * * @throws IllegalArgumentException if b2 == null */ public static FixedSizeBitVector or(FixedSizeBitVector b1, FixedSizeBitVector b2) throws IllegalArgumentException { if (b2 == null) { throw new IllegalArgumentException("b2 == null"); } FixedSizeBitVector b = new FixedSizeBitVector(b1); b.or(b2); return b; }
/** * Return a new FixedSizeBitVector as the OR of two others * * @throws IllegalArgumentException if b2 == null */ public static FixedSizeBitVector or(FixedSizeBitVector b1, FixedSizeBitVector b2) throws IllegalArgumentException { if (b2 == null) { throw new IllegalArgumentException("b2 == null"); } FixedSizeBitVector b = new FixedSizeBitVector(b1); b.or(b2); return b; }
/** * Return a new FixedSizeBitVector as the OR of two others * * @throws IllegalArgumentException if b2 == null */ public static FixedSizeBitVector or(FixedSizeBitVector b1, FixedSizeBitVector b2) throws IllegalArgumentException { if (b2 == null) { throw new IllegalArgumentException("b2 == null"); } FixedSizeBitVector b = new FixedSizeBitVector(b1); b.or(b2); return b; }
@Override public int getPredNodeCount(T N) { if (N == null) { throw new IllegalArgumentException("N is null"); } if (N.equals(exit())) { // TODO: cache if necessary FixedSizeBitVector x = FixedSizeBitVector.or(normalToExit, exceptionalToExit); return x.populationCount(); } else { boolean normalIn = getNumberOfNormalIn(N) > 0; boolean exceptionalIn = getNumberOfExceptionalIn(N) > 0; if (normalIn) { if (exceptionalIn) { return Iterator2Collection.toSet(getPredNodes(N)).size(); } else { return getNumberOfNormalIn(N); } } else { return getNumberOfExceptionalIn(N); } } }
@Override public int getPredNodeCount(T N) { if (N == null) { throw new IllegalArgumentException("N is null"); } if (N.equals(exit())) { // TODO: cache if necessary FixedSizeBitVector x = FixedSizeBitVector.or(normalToExit, exceptionalToExit); return x.populationCount(); } else { boolean normalIn = getNumberOfNormalIn(N) > 0; boolean exceptionalIn = getNumberOfExceptionalIn(N) > 0; if (normalIn) { if (exceptionalIn) { return Iterator2Collection.toSet(getPredNodes(N)).size(); } else { return getNumberOfNormalIn(N); } } else { return getNumberOfExceptionalIn(N); } } }