Builds an at-least-k constraint.
@param result the result
@param vars   the variables
@param rhs    the right-hand side
@throws IllegalArgumentException if the right hand side of the constraint was negative
342263
void buildALK(final EncodingResult result, final Variable[] vars, int rhs) {
    final LNGVector<Variable> cardinalityOutvars = this.initializeConstraint(result, vars);
    this.incData = new CCIncrementalData(result, CCConfig.ALK_ENCODER.TOTALIZER, rhs, vars.length, cardinalityOutvars);
    this.toCNF(cardinalityOutvars, rhs, Bound.LOWER);
    assert this.cardinalityInvars.size() == 0;
    for (int i = 0; i < rhs; i++)
      this.result.addClause(cardinalityOutvars.get(i));
  }
1219811
public void setResultProperties(AbstractWrapperIdPages results) {
        // There are no values to copy
        results.setId(0);
        results.setPage(0);
        results.setTotalPages(0);
        results.setTotalResults(0);
    }
1240087
private void exk(final EncodingResult result, final Variable[] vars, int rhs) {
    if (rhs < 0)
      throw new IllegalArgumentException("Invalid right hand side of cardinality constraint: " + rhs);
    if (rhs > vars.length) {
      result.addClause();
      return;
    }
    if (rhs == 0) {
      for (final Variable var : vars)
        result.addClause(var.negate());
      return;
    }
    if (rhs == vars.length) {
      for (final Variable var : vars)
        result.addClause(var);
      return;
    }
    switch (this.config().exkEncoder) {
      case TOTALIZER:
        if (this.exkTotalizer == null)
          this.exkTotalizer = new CCEXKTotalizer();
        this.exkTotalizer.build(result, vars, rhs);
        break;
      case CARDINALITY_NETWORK:
        if (this.exkCardinalityNetwork == null)
          this.exkCardinalityNetwork = new CCEXKCardinalityNetwork();
        this.exkCardinalityNetwork.build(result, vars, rhs);
        break;
      case BEST:
        this.bestEXK(vars.length).build(result, vars, rhs);
        break;
      default:
        throw new IllegalStateException("Unknown exactly-k encoder: " + this.config().exkEncoder);
    }
  }
401935
@Override public void makeBuildVariables(AbstractBuild build, Map<String,String> variables) {
        super.makeBuildVariables(build, variables);
    }
1055048
@Override
  public void build(Result<QueryKraken> result)
  {
    getDelegate().build(result.then(query->buildExplain(query)));
  }
160383
public function addEagerConstraints(array $results)
    {
        $this->query->whereIn($this->getForeignKey(), $this->getKeysFromResults($results));
    }
864102
@Deprecated
	public ResultSetConstraint build(Map<String, List<String>> constraints)
	{
		return builder(constraints).build();
	}
627242
@Override
    public void makeBuildVariables(AbstractBuild build, Map<String, String> variables) {
        // global var/password pairs
        MaskPasswordsConfig config = MaskPasswordsConfig.getInstance();
        List<VarPasswordPair> globalVarPasswordPairs = config.getGlobalVarPasswordPairs();
        // we can't use variables.putAll() since passwords are ciphered when in varPasswordPairs
        for(VarPasswordPair globalVarPasswordPair: globalVarPasswordPairs) {
            variables.put(globalVarPasswordPair.getVar(), globalVarPasswordPair.getPassword());
        }

        // job's var/password pairs
        if(varPasswordPairs != null) {
            // cf. comment above
            for(VarPasswordPair varPasswordPair: varPasswordPairs) {
                if(StringUtils.isNotBlank(varPasswordPair.getVar())) {
                    variables.put(varPasswordPair.getVar(), varPasswordPair.getPassword());
                }
            }
        }
    }
1246261
public static Rule conditionsRule(final Set<Condition> conditions, StateObj results) {
        if (null == conditions) {
            throw new NullPointerException("conditions must not be null");
        }
        final StateObj newstate = States.state(results);
        return new Rule() {
            @Override
            public boolean test(final StateObj input) {
                return applyConditions(input, conditions, true);
            }

            @Override
            public StateObj evaluate(final StateObj stateObj) {
                if (test(stateObj)) {
                    return newstate;
                }
                return null;
            }

            @Override
            public String toString() {
                return "Rule: Conditions(" + conditions + ") => " + newstate;
            }
        };
    }
562815
public void setResult(Result result) throws IllegalArgumentException
  {

    if (null == result)
      throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_RESULT_NULL, null)); //"result should not be null");

    try
    {
//      ContentHandler handler =
//        m_transformer.createResultContentHandler(result);
//      m_transformer.setContentHandler(handler);
        SerializationHandler xoh = 
            m_transformer.createSerializationHandler(result);
        m_transformer.setSerializationHandler(xoh);
    }
    catch (javax.xml.transform.TransformerException te)
    {
      throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_RESULT_COULD_NOT_BE_SET, null)); //"result could not be set");
    }

    m_result = result;
  }
362012
public function addEagerConstraints(array $results)
    {
        $table = $this->parentMap->getTable();

        $this->query->whereIn($table.'.'.$this->firstKey, $this->getKeysFromResults($results));
    }
745026
function(results) {        
        for(var i = 0; i < results.rows.length; i++) {
            console.log("Result " + (i + 1) + ": ");
            var row = results.rows[i];
            for(var j = 0; j < results.fields.length; j++) {
                var field = results.fields[j];
                var value = row[j];
                
                console.log("  " + field + " = " + value);
            }
        }
    }
87970
void buildAMK(final EncodingResult result, final Variable[] vars, int rhs) {
    final LNGVector<Variable> cardinalityOutvars = this.initializeConstraint(result, vars);
    this.incData = new CCIncrementalData(result, CCConfig.AMK_ENCODER.TOTALIZER, rhs, cardinalityOutvars);
    this.toCNF(cardinalityOutvars, rhs, Bound.UPPER);
    assert this.cardinalityInvars.size() == 0;
    for (int i = rhs; i < cardinalityOutvars.size(); i++)
      this.result.addClause(cardinalityOutvars.get(i).negate());
  }
1148631
private void addResult(ValidationResult result) {
		if (result == null || result.count() == 0) {
			return;
		}
		this.results.add(result);
	}
1262389
public RetryerBuilder<V> retryIfResult(@Nonnull Predicate<V> resultPredicate) {
        Preconditions.checkNotNull(resultPredicate, "resultPredicate may not be null");
        rejectionPredicate = Predicates.or(rejectionPredicate, new ResultPredicate<V>(resultPredicate));
        return this;
    }
1201214
static double slowCos(final double x, final double result[]) {

        final double xs[] = new double[2];
        final double ys[] = new double[2];
        final double facts[] = new double[2];
        final double as[] = new double[2];
        split(x, xs);
        ys[0] = ys[1] = 0.0;

        for (int i = FACT.length-1; i >= 0; i--) {
            splitMult(xs, ys, as);
            ys[0] = as[0]; ys[1] = as[1];

            if ( (i & 1) != 0) { // skip odd entries
                continue;
            }

            split(FACT[i], as);
            splitReciprocal(as, facts);

            if ( (i & 2) != 0 ) { // alternate terms are negative
                facts[0] = -facts[0];
                facts[1] = -facts[1];
            }

            splitAdd(ys, facts, as);
            ys[0] = as[0]; ys[1] = as[1];
        }

        if (result != null) {
            result[0] = ys[0];
            result[1] = ys[1];
        }

        return ys[0] + ys[1];
    }
1101818
@Override
    public Predicate gt(Expression<? extends Number> lhs, Number rhs)
    {
        return new ComparisonPredicate(lhs, rhs, ConditionalOperator.GT);
    }