Updates a pseudo-Boolean encoding.
@param s   the solver
@param rhs the new right hand side
@throws IllegalStateException if the pseudo-Boolean encoding is unknown
336973
public void updatePB(final MiniSatStyleSolver s, int rhs) {
    switch (this.pbEncoding) {
      case SWC:
        this.swc.update(s, rhs);
        break;
      default:
        throw new IllegalStateException("Unknown pseudo-Boolean encoding: " + this.pbEncoding);
    }
  }
1321032
public void init(HttpOutboundServiceContext sc, BNFHeaders hdrs) {
        // for requests, we don't care about the validation
        setHeaderValidation(false);
        setOwner(sc);
        setBinaryParseState(HttpInternalConstants.PARSING_BINARY_VERSION);
        if (null != hdrs) {
            hdrs.duplicate(this);
        }
        setVersion(getServiceContext().getHttpConfig().getOutgoingVersion());
    }
336827
static void updateAromaticTypesInSixMemberRing(int[] cycle, String[] symbs) {
        for (final int v : cycle) {
            if (NCN_PLUS.equals(symbs[v]) || "N+=C".equals(symbs[v]) || "N=+C".equals(symbs[v]))
                symbs[v] = "NPD+";
            else if ("N2OX".equals(symbs[v]))
                symbs[v] = "NPOX";
            else if ("N=C".equals(symbs[v]) || "N=N".equals(symbs[v]))
                symbs[v] = "NPYD";
            else if (symbs[v].startsWith("C")) symbs[v] = "CB";
        }
    }
627177
public static Matcher assignmentWithRhs(final Matcher rhsMatcher) {
    return new Matcher() {
      @Override public boolean matches(Node node, NodeMetadata metadata) {
        return node.isAssign() && rhsMatcher.matches(node.getLastChild(), metadata);
      }
    };
  }
1002655
public static byte decodeHexByte(CharSequence s, int pos) {
        int hi = decodeHexNibble(s.charAt(pos));
        int lo = decodeHexNibble(s.charAt(pos + 1));
        if (hi == -1 || lo == -1) {
            throw new IllegalArgumentException(String.format(
                    "invalid hex byte '%s' at index %d of '%s'", s.subSequence(pos, pos + 2), pos, s));
        }
        return (byte) ((hi << 4) + lo);
    }
1234007
public synchronized void
addRR(Record r) {
	if (rrs.size() == 0) {
		safeAddRR(r);
		return;
	}
	Record first = first();
	if (!r.sameRRset(first))
		throw new IllegalArgumentException("record does not match " +
						   "rrset");

	if (r.getTTL() != first.getTTL()) {
		if (r.getTTL() > first.getTTL()) {
			r = r.cloneRecord();
			r.setTTL(first.getTTL());
		} else {
			for (int i = 0; i < rrs.size(); i++) {
				Record tmp = (Record) rrs.get(i);
				tmp = tmp.cloneRecord();
				tmp.setTTL(r.getTTL());
				rrs.set(i, tmp);
			}
		}
	}

	if (!rrs.contains(r))
		safeAddRR(r);
}
1049814
void join(final MiniSatStyleSolver s, final LNGIntVector lits, int rhs) {
    assert this.incrementalStrategy == MaxSATConfig.IncrementalStrategy.ITERATIVE;
    final LNGIntVector leftCardinalityOutlits = new LNGIntVector(this.cardinalityOutlits);
    int oldCardinality = this.currentCardinalityRhs;
    if (lits.size() > 1)
      this.build(s, lits, rhs < lits.size() ? rhs : lits.size());
    else {
      assert lits.size() == 1;
      this.cardinalityOutlits.clear();
      this.cardinalityOutlits.push(lits.get(0));
    }
    final LNGIntVector rightCardinalityOutlits = new LNGIntVector(this.cardinalityOutlits);
    this.cardinalityOutlits.clear();
    for (int i = 0; i < leftCardinalityOutlits.size() + rightCardinalityOutlits.size(); i++) {
      final int p = mkLit(s.nVars(), false);
      MaxSAT.newSATVariable(s);
      this.cardinalityOutlits.push(p);
    }
    this.currentCardinalityRhs = rhs;
    this.adder(s, leftCardinalityOutlits, rightCardinalityOutlits, this.cardinalityOutlits);
    this.currentCardinalityRhs = oldCardinality;
  }
515099
public void addTransition(Character c, State s) {
        transitions.put(c, s);
        d_recomputeHash = true;
    }
518137
@Override
    public boolean put(String s, V v) {
        int t = 0;
        int limit = s.length();
        int last = 0;
        for (int k = 0; k < limit; k++) {
            char c = s.charAt(k);
            if (isCaseInsensitive() && c < 128)
                c = StringUtils.lowercases[c];

            while (true) {
                int row = ROW_SIZE * t;

                // Do we need to create the new row?
                if (t == _rows) {
                    _rows++;
                    if (_rows >= _key.length) {
                        _rows--;
                        return false;
                    }
                    _tree[row] = c;
                }

                char n = _tree[row];
                int diff = n - c;
                if (diff == 0)
                    t = _tree[last = (row + EQ)];
                else if (diff < 0)
                    t = _tree[last = (row + LO)];
                else
                    t = _tree[last = (row + HI)];

                // do we need a new row?
                if (t == 0) {
                    t = _rows;
                    _tree[last] = (char) t;
                }

                if (diff == 0)
                    break;
            }
        }

        // Do we need to create the new row?
        if (t == _rows) {
            _rows++;
            if (_rows >= _key.length) {
                _rows--;
                return false;
            }
        }

        // Put the key and value
        _key[t] = v == null ? null : s;
        _value[t] = v;

        return true;
    }
403989
def _update_rhs(curr_rhs, xCore, zCore, new_rhs):
    
    # TODO: Use intermediate variable to use 5 nested loops instead of 6.
    r_x, n, r_old_x = xCore.shape
    num_obj, r_z, n, r_old_z = zCore.shape
    for idx in range(num_obj):
        for val in range(n):
            for alpha_old_z in range(r_old_z):
                for alpha_z in range(r_z):
                    for alpha_old_x in range(r_old_x):
                        for alpha_x in range(r_x):
                            curr_value = curr_rhs[idx, alpha_old_z, alpha_old_x]
                            curr_value *= xCore[alpha_x, val, alpha_old_x]
                            curr_value *= zCore[idx, alpha_z, val, alpha_old_z]
                            new_rhs[idx, alpha_z, alpha_x] += curr_value
209351
@GwtIncompatible("incompatible method")
    private static void register(final Object lhs, final Object rhs) {
        Set<Pair<IDKey, IDKey>> registry = getRegistry();
        if (registry == null) {
            registry = new HashSet<>();
            REGISTRY.set(registry);
        }
        final Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs);
        registry.add(pair);
    }
808001
protected void updatedSslSupport(SSLSupport service, Map<String, Object> props) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "updatedSslSupport", props);
        }

        sslSupport = service;

        // If the default pid has changed.. we need to go hunting for who was using the default.
        String id = (String) props.get(SSL_CFG_REF);
        if (!defaultId.equals(id)) {
            for (SSLChannelOptions options : sslOptions.values()) {
                options.updateRefId(id);
                options.updateRegistration(bContext, sslConfigs);
            }
            defaultId = id;
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "updatedSslSupport", "defaultConfigId=" + defaultId);
        }
    }
313819
@Override
    protected void setPseudoHeaders(HashMap<String, String> pseudoHeaders) throws Exception {
        //Only defined pseudo-header for a response is :status.

        for (Entry<String, String> entry : pseudoHeaders.entrySet()) {
            H2HeaderField header = new H2HeaderField(entry.getKey(), entry.getValue());
            if (!isValidPseudoHeader(header)) {
                throw new CompressionException("Invalid pseudo-header for decompression context: " + header.toString());
            }
        }
        setStatusCode(Integer.getInteger(pseudoHeaders.get(HpackConstants.STATUS)));
    }
391037
void hashUpdate(final long hash0, final long hash1) {
    int col = Long.numberOfLeadingZeros(hash1);
    if (col < fiCol) { return; } // important speed optimization
    if (col > 63) { col = 63; } // clip so that 0 <= col <= 63
    final long c = numCoupons;
    if (c == 0) { promoteEmptyToSparse(this); }
    final long k = 1L << lgK;
    final int row = (int) (hash0 & (k - 1L));
    int rowCol = (row << 6) | col;

    // Avoid the hash table's "empty" value which is (2^26 -1, 63) (all ones) by changing it
    // to the pair (2^26 - 2, 63), which effectively merges the two cells.
    // This case is *extremely* unlikely, but we might as well handle it.
    // It can't happen at all if lgK (or maxLgK) < 26.
    if (rowCol == -1) { rowCol ^= (1 << 6); } //set the LSB of row to 0

    if ((c << 5) < (3L * k)) { updateSparse(this, rowCol); }
    else { updateWindowed(this, rowCol); }
  }
699926
public void setCharacterEncoding(String encoding)
        throws UnsupportedEncodingException
    {
        if (_inputState!=0)
            throw new IllegalStateException("getReader() or getInputStream() called");
        "".getBytes(encoding);
        _httpRequest.setCharacterEncoding(encoding,false);
    }
1351314
public void setStandard(String s)
    {
        s = s.toLowerCase();
        if (s.indexOf("allow") > -1)
        {
            standard = true;
        }
        else
        {
            standard = false;
        }
    }
505706
public final void push(String s)
  {

    if ((m_firstFree + 1) >= m_mapSize)
    {
      m_mapSize += m_blocksize;

      String newMap[] = new String[m_mapSize];

      System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);

      m_map = newMap;
    }

    m_map[m_firstFree] = s;

    m_firstFree++;
  }