Package java.util

Examples of java.util.BitSet.andNot()


        BitSet newIn = new BitSet(regsCount);
        List<BlockNode> successors = block.getSuccessors();
        for (int s = 0, successorsSize = successors.size(); s < successorsSize; s++) {
          newIn.or(liveIn[successors.get(s).getId()]);
        }
        newIn.andNot(defs[blockId]);
        newIn.or(uses[blockId]);
        if (!prevIn.equals(newIn)) {
          changed = true;
          liveIn[blockId] = newIn;
        }
View Full Code Here


      } else {
        BitSet bs = new BitSet(block.getDoms().length());
        bs.or(block.getDoms());
        for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) {
          BlockNode dom = basicBlocks.get(i);
          bs.andNot(dom.getDoms());
        }
        if (bs.cardinality() != 1) {
          throw new JadxRuntimeException("Can't find immediate dominator for block " + block
              + " in " + bs + " preds:" + preds);
        }
View Full Code Here

      }

      // intersect to get dominator of dominators
      List<BlockNode> domBlocks = BlockUtils.bitSetToBlocks(mth, bs);
      for (BlockNode block : domBlocks) {
        bs.andNot(block.getDoms());
      }
      domBlocks = BlockUtils.bitSetToBlocks(mth, bs);
      if (domBlocks.size() != 1) {
        throw new JadxRuntimeException(
            "Exception block dominator not found, method:" + mth + ". bs: " + bs);
View Full Code Here

                    {
                        return true;
                    }
                    if (s != null && os != null) {
                        final BitSet tmp = (BitSet) os.clone();
                        tmp.andNot(s);
                        return tmp.isEmpty();
                    }
                }
            }
            return false;
View Full Code Here

      final BitSet merged = BitSets.of(minorFactor, majorFactor);
      for (int i = 0; i < unusedEdges.size(); i++) {
        final LoptMultiJoin.Edge edge = unusedEdges.get(i);
        if (edge.factors.intersects(merged)) {
          BitSet newEdgeFactors = (BitSet) edge.factors.clone();
          newEdgeFactors.andNot(newFactors);
          newEdgeFactors.set(v);
          assert newEdgeFactors.cardinality() == 2;
          final LoptMultiJoin.Edge newEdge =
              new LoptMultiJoin.Edge(edge.condition, newEdgeFactors,
                  edge.columns);
View Full Code Here

    return createList(bitSet);
  }

  public boolean hasMissingPieces(AbstractTorrentPiecesContainer other) {
    final BitSet difference = (BitSet) bitSet.clone();
    difference.andNot(other.bitSet);
    return difference.cardinality() != 0;
  }

  public List<TorrentPiece> getMissingPieces(AbstractTorrentPiecesContainer other) {
    final BitSet difference = (BitSet) bitSet.clone();
View Full Code Here

    return difference.cardinality() != 0;
  }

  public List<TorrentPiece> getMissingPieces(AbstractTorrentPiecesContainer other) {
    final BitSet difference = (BitSet) bitSet.clone();
    difference.andNot(other.bitSet);
    return createList(difference);
  }

  public List<TorrentPiece> createList(BitSet bits) {
    final List<TorrentPiece> list = new ArrayList<>();
View Full Code Here

        // Insert DDL into the System.
        createFromDDL(schema, ddl);

        // Return lowest id newly added.
        BitSet after = getAllTableIds();
        after.andNot(before);
        return after.nextSetBit(0);
    }

    protected int loadSchemaFile(String schemaName, File file) throws Exception {
        String sql = Strings.dumpFileToString(file);
View Full Code Here

            && (!sm.isFlushed() || sm.isFlushedDirty()))
            || (sm.getPCState() == PCState.PNEW && sm.isFlushedDirty())) {
            BitSet dirty = sm.getDirty();
            if (sm.isFlushed()) {
                dirty = (BitSet) dirty.clone();
                dirty.andNot(sm.getFlushed());
            }
            if (dirty.length() > 0)
                return dirty;
        }
        return null;
View Full Code Here

      if (b0 != null && b0.length() <= b.length()) {
        assertEquals(a.cardinality(), b.cardinality());

        BitSet a_and = (BitSet)a.clone(); a_and.and(a0);
        BitSet a_or = (BitSet)a.clone(); a_or.or(a0);
        BitSet a_andn = (BitSet)a.clone(); a_andn.andNot(a0);

        FixedBitSet b_and = (FixedBitSet)b.clone(); assertEquals(b,b_and); b_and.and(b0);
        FixedBitSet b_or = (FixedBitSet)b.clone(); b_or.or(b0);
        FixedBitSet b_andn = (FixedBitSet)b.clone(); b_andn.andNot(b0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.