Examples of variables()


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

    }
    public void init(Solver solver) {}
    public Neighbour selectNeighbour(Solution solution) {
        Model model = solution.getModel();
        boolean canConflict = model.nrAssignedVariables()!=0;
        Variable variable = (Variable)ToolBox.random(model.variables());
        Value value = (Value)ToolBox.random(variable.values());
        if (value.equals(variable.getAssignment())) return null;
        Set conflicts = model.conflictValues(value);
        double eval = iValueWeight * value.toDouble();
        if (variable.getAssignment()!=null)
View Full Code Here

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

    /** Initialization */
    public void init(Solver solver) {}
    /** Neighbour selection */
    public Neighbour selectNeighbour(Solution solution) {
        Model model = solution.getModel();
        Variable variable = (Variable)ToolBox.random(model.variables());
        Value value = (Value)ToolBox.random(variable.values());
        if (value.equals(variable.getAssignment())) return null;
        if (model.inConflict(value)) return null;
        return new ItcSimpleNeighbour(variable,value);
    }
View Full Code Here

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

    /** Initialization */
    public void init(Solver solver) {}
    /** Neighbour selection */
    public Neighbour selectNeighbour(Solution solution) {
        Model model = solution.getModel();
        Variable variable = (Variable)ToolBox.random(model.variables());
        if (!(variable instanceof Swapable)) return null;
        Variable anotherVariable = (Variable)ToolBox.random(model.variables());
        if (variable.equals(anotherVariable)) return null;
        return ((Swapable)variable).findSwap(anotherVariable);
    }
View Full Code Here

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

    /** Neighbour selection */
    public Neighbour selectNeighbour(Solution solution) {
        Model model = solution.getModel();
        Variable variable = (Variable)ToolBox.random(model.variables());
        if (!(variable instanceof Swapable)) return null;
        Variable anotherVariable = (Variable)ToolBox.random(model.variables());
        if (variable.equals(anotherVariable)) return null;
        return ((Swapable)variable).findSwap(anotherVariable);
    }
}
View Full Code Here

Examples of net.sourceforge.jFuzzyLogic.FunctionBlock.variables()

    if( fis == null ) { return; }
    functionBlock = fis.getFunctionBlock(null);
    variables.clear();
    FunctionBlock block = fis.getFunctionBlock(null);

    for( Variable x : block.variables() )
      variables.add(x);
    ((GenericModel) model).setVariables(variables);
  }

  @Override
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.ListVariable.variables()

      public void manipulate(Program program) {
        ExpressionStatement statement = (ExpressionStatement) program
            .statements().get(0);
        Assignment expression = (Assignment) statement.getExpression();
        ListVariable list = (ListVariable) expression.getLeftHandSide();
        list.variables().remove(0);
      }
    });
  }

  public void testListMiddle() throws Exception {
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.ListVariable.variables()

      public void manipulate(Program program) {
        ExpressionStatement statement = (ExpressionStatement) program
            .statements().get(0);
        Assignment expression = (Assignment) statement.getExpression();
        ListVariable list = (ListVariable) expression.getLeftHandSide();
        list.variables().remove(2);
      }
    });
  }

  public void testListLast() throws Exception {
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.ListVariable.variables()

      public void manipulate(Program program) {
        ExpressionStatement statement = (ExpressionStatement) program
            .statements().get(0);
        Assignment expression = (Assignment) statement.getExpression();
        ListVariable list = (ListVariable) expression.getLeftHandSide();
        list.variables().remove(3);
      }
    });
  }

  public void testDeleteBreak() throws Exception {
View Full Code Here

Examples of org.renjin.compiler.ir.tac.expressions.Expression.variables()

  private void search(BasicBlock X) {
   
    for(Statement stmt : X.getStatements()) {
      Expression rhs = stmt.getRHS();
      if(!(rhs instanceof PhiFunction)) {
        for(Variable V : rhs.variables()) {
          int i = Top(V);
          rhs = rhs.replaceVariable(V, new SsaVariable(V, i));
        }
        stmt = X.replaceStatement(stmt, stmt.withRHS(rhs));
      }
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.