Examples of addConstraint()


Examples of choco.kernel.model.Model.addConstraint()

   
    // constraints
    // repartition sur les plages horaires
    // les creneaux a placer ne doivent pas l'etre en meme temps
    Constraint c1 = Choco.disjunctive(creneauxAPlacer)
    m.addConstraint(c1);
   
    // precedences
    Constraint[] c2 = new Constraint[preced.length];
    for(int i = 0; i < c2.length; i++) {
      c2[i] = Choco.startsAfterBegin(preced[i].getCours2(), preced[i].getCours2(), preced[i].getDureeMinEntre());
View Full Code Here

Examples of com.caucho.server.security.SecurityConstraint.addConstraint()

          SecurityConstraint constraint = new SecurityConstraint();
          constraint.setFallthrough(false);

          if (emptyRoleSemantic == ServletSecurity.EmptyRoleSemantic.DENY) {
            constraint.addConstraint(new PermitEmptyRolesConstraint(false));
          } else if (roles.length == 0
                     && transportGuarantee == ServletSecurity.TransportGuarantee.NONE) {
            constraint.addConstraint(new PermitEmptyRolesConstraint(true));
          } else {
            for (String role : roles)
View Full Code Here

Examples of com.exigen.ie.constrainer.Constrainer.addConstraint()

      intvars.set(var, i);
    }

    com.exigen.ie.constrainer.Constraint allDiff =
      new com.exigen.ie.constrainer.impl.ConstraintAllDiff(intvars);
    setImpl(constrainer.addConstraint(allDiff));
  }
}
View Full Code Here

Examples of com.pholser.junit.quickcheck.internal.ParameterContext.addConstraint()

    }

    @Test public void whenDiscardRatioExceededEvenWithSomeSuccesses() {
        ParameterContext parameter = new ParameterContext(int.class);
        parameter.addQuantifier(quantifier);
        parameter.addConstraint(constraint);

        GenerationContext generation =
            new GenerationContext(parameter, new GeneratorRepository(random).register(generator));

        thrown.expect(GenerationContext.DiscardRatioExceededException.class);
View Full Code Here

Examples of com.sun.appserv.web.cache.mapping.ConstraintField.addConstraint()

                value = fieldConfig.getAttributeValue(com.sun.enterprise.deployment.runtime.web.ConstraintField.VALUE, j, com.sun.enterprise.deployment.runtime.web.ConstraintField.CACHE_ON_MATCH_FAILURE);
                if (value != null) {
                    constraint.setCacheOnMatchFailure(
                                    ConfigBean.toBoolean(value));
                }
                constraintField.addConstraint(constraint);

                if (logger.isLoggable(Level.FINE)) {
                    logger.fine("added a constraint: " + constraint.toString());
                }
            }
View Full Code Here

Examples of com.sun.jdo.spi.persistence.support.sqlstore.RetrieveDesc.addConstraint()

        // The entire filter consists of a boolean field only.
        // Map this to 'booleanField <> FALSE'. Note, the runtime will
        // create a JDBC parameter for the literal FALSE and call
        // setBoolean to bind the value.
        RetrieveDesc rd = expr.getRetrieveDesc();
        rd.addConstraint(null, RetrieveDesc.OP_VALUE, Boolean.FALSE);
        expression(expr);
        rd.addConstraint(null, RetrieveDesc.OP_NE, null);
        break;
        default:
        expression(expr);
View Full Code Here

Examples of com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.Statement.addConstraint()

                for (int j = 0; j < s.tableList.size(); j++) {
                    QueryTable t = (QueryTable) s.tableList.get(j);

                    if (t.getTableDesc().getTableElement() == c.getDeclaringTable()) {
                        s.addConstraint(lf, val);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.DoubleParameter.addConstraint()

    @Override
    protected void makeOptions(Parameterization config) {
      super.makeOptions(config);
      DoubleParameter xiP = new DoubleParameter(XI_ID);
      xiP.addConstraint(new IntervalConstraint(0.0, IntervalConstraint.IntervalBoundary.CLOSE, 1.0, IntervalConstraint.IntervalBoundary.OPEN));
      if(config.grab(xiP)) {
        xi = xiP.getValue();
      }

      ClassParameter<OPTICSTypeAlgorithm<D>> opticsP = new ClassParameter<OPTICSTypeAlgorithm<D>>(XIALG_ID, OPTICSTypeAlgorithm.class, OPTICS.class);
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntListParameter.addConstraint()

    @Override
    protected void makeOptions(Parameterization config) {
      super.makeOptions(config);
      final IntListParameter param = new IntListParameter(BINSPERPLANE_ID, false);
      param.addConstraint(new ListSizeConstraint<Integer>(3));
      param.addConstraint(new ListGreaterEqualConstraint<Integer>(1));

      if(config.grab(param)) {
        List<Integer> quant = param.getValue();
        if(quant.size() != 3) {
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.IntParameter.addConstraint()

      configK(config);
      configKI(config);
      configL(config);

      IntParameter m_iP = new IntParameter(M_I_ID, 10);
      m_iP.addConstraint(new GreaterConstraint(0));
      if(config.grab(m_iP)) {
        m_i = m_iP.getValue();
      }

      LongParameter seedP = new LongParameter(SEED_ID, true);
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.