Examples of andNot()


Examples of java.util.BitSet.andNot()

        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_xor = (BitSet)a.clone(); a_xor.xor(a0);
        BitSet a_andn = (BitSet)a.clone(); a_andn.andNot(a0);

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

Examples of java.util.BitSet.andNot()

        if (state != null && !embedded) {
            // make sure that all the fields in the original FG are loaded
            // before we try to compare version
            if (fields != null && !fields.equals(sm.getLoaded())) {
                BitSet toLoad = (BitSet) fields.clone();
                toLoad.andNot(sm.getLoaded()); // skip already loaded fields
                if (toLoad.length() > 0)
                    sm.loadFields(toLoad, null, LockLevels.LOCK_NONE, null,
                        false);
                //### we should calculate lock level above
            }
View Full Code Here

Examples of java.util.BitSet.andNot()

  int deleteAtoms(BitSet bs) {
    BitSet bsNew = BitSetUtil.copy(bs);
    if (bsDeleted == null) {
      bsDeleted = bsNew;
    } else {
      bsNew.andNot(bsDeleted);
      bsDeleted.or(bs);
    }
    bsHidden.andNot(bsDeleted);
    bsSelection.andNot(bsDeleted);
    return bsNew.cardinality();
View Full Code Here

Examples of java.util.BitSet.andNot()

      sb.append("H ").append(pts[i].x).append(" ").append(pts[i].y).append(" ")
          .append(pts[i].z).append(" - - - - ").append(++atomno).append('\n');
    loadInline(sb.toString(), '\n', true, null);
    eval.runScript(sbConnect.toString(), null);
    BitSet bsB = getModelUndeletedAtomsBitSet(modelIndex);
    bsB.andNot(bsA);
    return bsB;
  }

  public void setMarBond(short marBond) {
    global.bondRadiusMilliAngstroms = marBond;
View Full Code Here

Examples of java.util.BitSet.andNot()

    Vector3f v2 = new Vector3f(deltaX, deltaY, 0);
    v1.cross(v1, v2);
    float degrees = (v1.z > 0 ? 1 : -1) * v2.length();
  
    BitSet bs = BitSetUtil.copy(bsBranch);
    bs.andNot(selectionManager.getMotionFixedAtoms());

    rotateAboutPointsInternal(atom1, atom2, 0, degrees, false, bs,
        null, null);
  }

View Full Code Here

Examples of java.util.BitSet.andNot()

      setCurrentModelIndex(-1, true);
    hoverAtomIndex = -1;
    setFileLoadStatus(JmolConstants.FILE_STATUS_MODELS_DELETED, null, null, null, null);
    refreshMeasures(true);
    if (bsD0 != null)
      bsDeleted.andNot(bsD0);
    return BitSetUtil.cardinalityOf(bsDeleted);
  }

  public void deleteBonds(BitSet bsDeleted) {
    modelSet.deleteBonds(bsDeleted, false);
View Full Code Here

Examples of java.util.BitSet.andNot()

    // We always fix any atoms that
    // are in the visible frame set and are within 5 angstroms
    // and are not already selected
   
    BitSet bsNearby = getAtomsWithin(rangeFixed, bsSelected, true);
    bsNearby.andNot(bsSelected);
    if (haveFixed) {
      bsMotionFixed.and(bsNearby);
    } else {
      bsMotionFixed = bsNearby;
    }
View Full Code Here

Examples of java.util.BitSet.andNot()

        BitSet bsConformation = viewer.getModelUndeletedAtomsBitSet(i);
        if (conformationIndex >= 0) {
          if (!models[i].getPdbConformation(bsConformation, conformationIndex))
            for (int c = nAltLocs; --c >= 0;)
              if (c != conformationIndex)
                bsConformation.andNot(getAtomBits(Token.spec_alternate, altLocs
                    .substring(c, c + 1)));
        }
        if (bsConformation.nextSetBit(0) >= 0) {
          bs.or(bsConformation);
          if (doSet)
View Full Code Here

Examples of java.util.BitSet.andNot()

    // models that are model kits.

    BitSet bs1 = BitSetUtil.copy(bsDeleted);
    for (int i = 0; i < modelCount; i++)
      if (!models[i].isModelKit)
        bs1.andNot(models[i].bsAtoms);
    return BitSetUtil.deleteBits(bs, bs1);
  }
 
  public void setAtomNamesAndNumbers(int iFirst, int baseAtomIndex, AtomCollection mergeSet) {
    // first, validate that all atomSerials are NaN
View Full Code Here

Examples of java.util.BitSet.andNot()

      sb.append("select ").append(Escape.escape(bs)).append(" & connected; wireframe only;");
    // ... and all non-biopolymer and not connected to stars...
    if (bs != bsAtoms) {
      bs2.clear();
      bs2.or(bsAtoms);
      bs2.andNot(bs);
      if (bs2.nextSetBit(0) >= 0)
        sb.append("select " + Escape.escape(bs2) + " & !connected;stars 0.5;");
    }
  }
 
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.