Examples of RandomType


Examples of org.optaplanner.core.config.solver.random.RandomType

                                + ") has a non-null randomType (" + randomType
                                + ") or a non-null randomSeed (" + randomSeed + ").");
            }
            randomFactory = ConfigUtils.newInstance(this, "randomFactoryClass", randomFactoryClass);
        } else {
            RandomType randomType_ = randomType == null ? RandomType.JDK : randomType;
            Long randomSeed_ = randomSeed;
            if (randomSeed == null && environmentMode != EnvironmentMode.PRODUCTION) {
                randomSeed_ = DEFAULT_RANDOM_SEED;
            }
            randomFactory = new DefaultRandomFactory(randomType_, randomSeed_);
View Full Code Here

Examples of org.rascalmpl.library.cobra.RandomType

    return vf.tuple(elems);
  }

  @Override
  public IValue visitValue(Type type) {
    RandomType rt = new RandomType();
    return this.generate(rt.getType(maxDepth));
  }
View Full Code Here

Examples of org.rascalmpl.library.cobra.RandomType

 
  @Test
  public void testLubAndGlb() {
    Set<Type> types = new HashSet<Type>();
   
    RandomType rg = new RandomType();
    rg.plusRascalTypes(true);
   
    for(int i = 0; i <= 1000; i++) {
      types.add(rg.getFunctionType(2));
      types.add(rg.getReifiedType(5));
      types.add(rg.getOverloadedFunctionType(2));
    }
   
    for (Type t : types) {
      if (t.lub(t) != t) {
        fail("lub should be idempotent: " + t + " != " + t.lub(t));
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.