Package java.util

Examples of java.util.BitSet.clear()


    harness.check(bs.get(5));

    boolean pass = false;
    try
    {
      bs.clear(-1, 2);
    }
    catch (IndexOutOfBoundsException e)
    {
      pass = true;
    }
View Full Code Here


    harness.check(pass);
   
    pass = false;
    try
    {
      bs.clear(2, 1);
    }
    catch (IndexOutOfBoundsException e)
    {
      pass = true;
    }
View Full Code Here

        if (model_.doAction(index)) {
          return index;
        }
        else {
          // it was not enabled, so keep trying other toDo transitions
          tryToDo.clear(index);
        }
      }
    }
    // no toDo actions (or none enabled), so just choose any action
    return doRandomAction();
View Full Code Here

            for (int i = 0; i < nb; i++)
              if (lengths[i] >= max && bs.get(points[i])) {
                imax = points[i];
                max = lengths[i];
              }
            bs.clear(imax);
          }
        }
        viewer.undoAction(atomIndex, AtomCollection.TAINT_COORD, true);
        viewer.invertSelected(null, null, atomIndex, bs);
        viewer.setStatusAtomPicked(atomIndex, "inverted: " + Escape.escape(bs));
View Full Code Here

    for (int i = bioPolymers.length; --i >= 0;) {
      if (!(bioPolymers[i] instanceof AminoPolymer))
        continue;
      bsSheet.clear();
      bsBridge.clear();
      AminoPolymer ap = (AminoPolymer) bioPolymers[i];
      for (int iStart = 0; iStart < ap.monomerCount; ) {
        int index = ap.monomers[iStart].leadAtomIndex;
        if (bsEEE.get(index)) {
          int iEnd = iStart + 1;
View Full Code Here

        if (j < 0) {
          iToken = pt2 - 1;
        } else if (!isSyntaxCheck) {
          for (; j >= 0; j = bsAtoms.nextSetBit(j + 1)) {
            if (jlast >= 0)
              bsX.clear(jlast);
            jlast = j;
            bsX.set(j);
            t.index = j;
            res = parameterExpression(i, pt2, (isFor ? "XXX" : null), ignoreComma, isFor,
                j, false, localVars, isFunctionOfX ? null : dummy);
View Full Code Here

          switch (tok) {
          case Token.function:
            bsAtom.set(i);
            fv = ScriptVariable.fValue(runFunction(null, userFunction, params,
                tokenAtom, true));
            bsAtom.clear(i);
            break;
          case Token.property:
            fv = (data == null ? 0 : data[i]);
            break;
          case Token.distance:
View Full Code Here

              comparisonValue, comparisonValue + 1) : new BitSet());
        case Token.opNE:
        default:
          bs = BitSetUtil.setAll(atomCount);
          if (comparisonValue >= 0)
            bs.clear(comparisonValue);
          return bs;
        }
      } catch (Exception e) {
        return new BitSet();
      }
View Full Code Here

    int i = 1;
    if (tokAt(1) == Token.model || tokAt(1) == Token.frame) {
      i = modelNumberParameter(2);
      if (i < 0)
        error(ERROR_invalidArgument);
      bsModels.clear();
      bsModels.set(i);
      i = 3;
    }
    for (int iModel = bsModels.nextSetBit(0); iModel >= 0; iModel = bsModels
        .nextSetBit(iModel + 1)) {
View Full Code Here

      BoxInfo boxInfo = getBoxInfo((BitSet) specInfo, 1);
      bs = getAtomsWithin(boxInfo.getBoundBoxCornerVector().length() + 0.0001f,
          boxInfo.getBoundBoxCenter(), null, -1);
      for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1))
        if (!boxInfo.isWithin(atoms[i]))
          bs.clear(i);
      return bs;
    case Token.molecule:
      return getMoleculeBitSet((BitSet) specInfo);
    case Token.sequence:
      return getSequenceBits((String)specInfo, null);
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.