Examples of variables()


Examples of de.fuberlin.wiwiss.d2rq.algebra.NodeRelation.variables()

 
  public void testAskTwoTriplePatternsMatch() {
    NodeRelation nodeRel = translate1(
        "ex:res1 rdf:type ex:Class1 . ex:res1 ex:foo ?foo",
        "engine/simple.n3");
    assertEquals(Collections.singleton(foo), nodeRel.variables());
    assertEquals("Literal(Column(T2_table1.foo))", nodeRel.nodeMaker(foo).toString());
    Relation r = nodeRel.baseRelation();
    assertEquals("Conjunction(" +
        "Equality(" +
            "AttributeExpr(@@T1_table1.id@@), " +
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.NodeRelation.variables()

 
  public void testTwoTriplePatternsWithJoinMatch() {
    NodeRelation nodeRel = translate1(
        "?x rdf:type ex:Class1 . ?x ex:foo ?foo",
        "engine/simple.n3");
    assertEquals(2, nodeRel.variables().size());
    assertEquals("Literal(Column(T2_table1.foo))",
        nodeRel.nodeMaker(foo).toString());
    assertEquals("URI(Pattern(http://example.org/res@@T1_table1.id@@))",
        nodeRel.nodeMaker(x).toString());
    Relation r = nodeRel.baseRelation();
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Model.variables()

       
        boolean acceptConflicts = solution.getModel().getBestUnassignedVariables()>0;
        Model model = solution.getModel();
        double bestEval = 0.0;
        Vector best = null;
        for (Enumeration e=model.variables().elements();e.hasMoreElements();) {
            Variable variable = (Variable)e.nextElement();
            Value assigned = variable.getAssignment();
            double assignedVal = (assigned==null?iConflictWeight:iValueWeight*assigned.toDouble());
            for (Enumeration f=variable.values().elements();f.hasMoreElements();) {
                Value value = (Value)f.nextElement();
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Model.variables()

   
    /** Neighbour selection */
    public Neighbour selectNeighbour(Solution solution) {
        Model model = solution.getModel();
        if (iVarEn==null) {
            iVarEn = new RandomEnumeration(model.variables(), iRandomOrder);
            iVariable = (Variable)iVarEn.nextElement();
            Vector v2 = new Vector(iVariable.values().size()+model.variables().size());
            if (iAllowSwaps && iVariable instanceof Swapable)
                v2.addAll(model.variables());
            v2.addAll(iVariable.values());
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Model.variables()

    public Neighbour selectNeighbour(Solution solution) {
        Model model = solution.getModel();
        if (iVarEn==null) {
            iVarEn = new RandomEnumeration(model.variables(), iRandomOrder);
            iVariable = (Variable)iVarEn.nextElement();
            Vector v2 = new Vector(iVariable.values().size()+model.variables().size());
            if (iAllowSwaps && iVariable instanceof Swapable)
                v2.addAll(model.variables());
            v2.addAll(iVariable.values());
            iValEn = new RandomEnumeration(v2, iRandomOrder);
        }
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Model.variables()

        if (iVarEn==null) {
            iVarEn = new RandomEnumeration(model.variables(), iRandomOrder);
            iVariable = (Variable)iVarEn.nextElement();
            Vector v2 = new Vector(iVariable.values().size()+model.variables().size());
            if (iAllowSwaps && iVariable instanceof Swapable)
                v2.addAll(model.variables());
            v2.addAll(iVariable.values());
            iValEn = new RandomEnumeration(v2, iRandomOrder);
        }
        SimpleNeighbour n = null;
        if (!iValEn.hasMoreElements()) {
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Model.variables()

            iValEn = new RandomEnumeration(v2, iRandomOrder);
        }
        SimpleNeighbour n = null;
        if (!iValEn.hasMoreElements()) {
            if (!iVarEn.hasMoreElements()) {
                iVarEn = new RandomEnumeration(model.variables(), iRandomOrder);
            }
            iVariable = (Variable)iVarEn.nextElement();
            Vector v2 = new Vector(iVariable.values().size()+model.variables().size());
            if (iAllowSwaps && iVariable instanceof Swapable)
                v2.addAll(model.variables());
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Model.variables()

        if (!iValEn.hasMoreElements()) {
            if (!iVarEn.hasMoreElements()) {
                iVarEn = new RandomEnumeration(model.variables(), iRandomOrder);
            }
            iVariable = (Variable)iVarEn.nextElement();
            Vector v2 = new Vector(iVariable.values().size()+model.variables().size());
            if (iAllowSwaps && iVariable instanceof Swapable)
                v2.addAll(model.variables());
            v2.addAll(iVariable.values());
            iValEn = new RandomEnumeration(v2, iRandomOrder);
        }
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Model.variables()

                iVarEn = new RandomEnumeration(model.variables(), iRandomOrder);
            }
            iVariable = (Variable)iVarEn.nextElement();
            Vector v2 = new Vector(iVariable.values().size()+model.variables().size());
            if (iAllowSwaps && iVariable instanceof Swapable)
                v2.addAll(model.variables());
            v2.addAll(iVariable.values());
            iValEn = new RandomEnumeration(v2, iRandomOrder);
        }
        Object object = iValEn.nextElement();
        if (object instanceof Variable) {
View Full Code Here

Examples of net.sf.cpsolver.ifs.model.Model.variables()

            v2.addAll(iVariable.values());
            iValEn = new RandomEnumeration(v2, iRandomOrder);
        }
        Object object = iValEn.nextElement();
        if (object instanceof Variable) {
            Variable anotherVariable = (Variable)ToolBox.random(model.variables());
            if (iVariable.equals(anotherVariable)) return null;
            return ((Swapable)iVariable).findSwap(anotherVariable);
        } else {
            Value value = (Value)object;
            if (value.equals(iVariable.getAssignment())) return 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.