Examples of Assignment


Examples of aima.core.search.csp.Assignment

  protected void drawVariable(Graphics2D g2, Variable var) {
    int[] pos = getPosition(var);
    String label = var.getName();
    Object value = null;
    Color fillColor = null;
    Assignment assignment = ((CSPEnvironment) env).getAssignment();
    if (assignment != null)
      value = assignment.getAssignment(var);
    if (value != null) {
      label += " = " + value;
      fillColor = colorMapping.get(value);
    }
    g2.setColor(fillColor != null ? fillColor : Color.WHITE);
View Full Code Here

Examples of au.edu.mq.comp.junitGrading.Assignment

        for(int i = 0; i < config.numberOfWorkers(); i++)
            workGroup.addWorker(this.makeGrader(config));
        this.listOfAssignment = new LinkedList<Assignment>();
        while(true == ca.hasMoreAssignment())
        {
          Assignment assignment = ca.nextAssignment();
          if(null != assignment)
          {
              this.listOfAssignment().add(assignment);
            workGroup.pushWorkData(assignment);
          }
View Full Code Here

Examples of cc.mallet.grmm.types.Assignment

      if (unrolled.numVariables () == 0) return 0;   // Happens if all nodes are pruned.

      /* Save the expected value of each feature for when we
         compute the gradient. */
      Assignment observations = unrolled.getAssignment ();
      double value = collectExpectationsAndValue (unrolled, observations);

      if (Double.isNaN (value)) {
        System.out.println("NaN on instance "+i+" : "+instance.getName ());
        printDebugInfo (unrolled);
View Full Code Here

Examples of com.alibaba.jstorm.task.Assignment

    Map<Integer, LocalAssignment> portLA = new HashMap<Integer, LocalAssignment>();

    for (Entry<String, Assignment> assignEntry : assignments.entrySet()) {
      String topologyId = assignEntry.getKey();
      Assignment assignment = assignEntry.getValue();

      Map<Integer, LocalAssignment> portTasks = readMyTasks(
          stormClusterState, topologyId, supervisorId, assignment);
      if (portTasks == null) {
        continue;
View Full Code Here

Examples of com.alipay.bluewhale.core.task.common.Assignment

    Set<Entry<String, StormBase>> basesEntry = bases.entrySet();
    for (Iterator<Entry<String, StormBase>> it = basesEntry.iterator(); it.hasNext();) {
      Entry<String, StormBase> entry = it.next();
      String stormId = entry.getKey();
      StormBase base = entry.getValue();
      Assignment assignment = stormClusterState.assignment_info(stormId,null);
      if (assignment != null) {
        HashSet<NodePort> workers = new HashSet<NodePort>();
        Collection<NodePort> entryColl = assignment.getTaskToNodeport().values();
        workers.addAll(entryColl);
        topologySummaries.add(new TopologySummary(stormId, base.getStormName(), assignment.getTaskToNodeport().size(),
            workers.size(), TimeUtils.time_delta(base
                .getLanchTimeSecs()), extractStatusStr(base)));
      }
    }
    return new ClusterSummary(supervisorSummaries, uptime,topologySummaries);
View Full Code Here

Examples of com.dragome.compiler.ast.Assignment

    return op;
  }

  private boolean reduceXCrement(VariableDeclaration decl)
  {
    Assignment a1= null;
    Assignment a2= null;
    VariableBinding vb1= null;
    VariableBinding vb2= null;

    Assignable fa1= null;
    Assignable fa2= null;

    InfixExpression sum= null;

    Iterator iter= decl.vbs.iterator();

    while (iter.hasNext())
    {
      VariableBinding vb= (VariableBinding) iter.next();

      if (vb.getParentNode() instanceof Assignment)
      {
        Assignment a= (Assignment) vb.getParentNode();
        if (a.getLeftHandSide() == vb && a.getRightHandSide() instanceof Assignable)
        {
          vb1= vb;
          a1= a;
          fa1= (Assignable) a.getRightHandSide();
          continue;
        }
      }

      if (vb.getParentNode() instanceof InfixExpression)
      {
        InfixExpression infix= (InfixExpression) vb.getParentNode();
        if (infix.getParentNode() instanceof Assignment)
        {
          Assignment a= (Assignment) infix.getParentNode();
          if (a.getLeftHandSide() instanceof Assignable)
          {
            vb2= vb;
            fa2= (Assignable) a.getLeftHandSide();
            a2= a;
            sum= infix;
            continue;
          }
        }
View Full Code Here

Examples of com.google.javascript.jscomp.RenameVars.Assignment

        if (compiler.getCodingConvention().isExported(var.name, s.isLocal())) {
          continue;
        }

        // Try to look for the best shadow for the current candidate.
        Assignment bestShadow = findBestShadow(s);
        if (bestShadow == null) {
          continue;
        }

        // The name assignment being shadowed.
        Assignment localAssignment = assignments.get(var.getName());

        // Only shadow if this increases the number of occurrences of the
        // shadowed variable.
        if (bestShadow.count < localAssignment.count) {
          continue; // Hope the next local variable would have a smaller count.
View Full Code Here

Examples of com.google.ytd.model.Assignment

  @Override
  public Assignment getAssignmentById(long id) {
    PersistenceManager pm = pmf.getPersistenceManager();

    try {
      Assignment assignment = pm.getObjectById(Assignment.class, id);
      return pm.detachCopy(assignment);
    } catch (JDOObjectNotFoundException e) {
      log.log(Level.WARNING, e.getMessage(), e);
      return null;
    } finally {
View Full Code Here

Examples of com.hpctoday.fada.Assignment

          IASTUnaryExpression unOperand1 = (IASTUnaryExpression)operand1;
          operand1 = unOperand1.getOperand();
        }
       
        if(operand1 instanceof IASTIdExpression){
          Statement stmt = new Statement(new Assignment (operand1.getRawSignature(),rhs));
          if(inElse) parent.Enclose(stmt, true);
          else parent.Enclose(stmt, false);
        }
        else if (operand1 instanceof IASTArraySubscriptExpression) {
          ArrayAccessVisitor aVisitor = new ArrayAccessVisitor();
          operand1.accept(aVisitor);
          List<Expression> flist = aVisitor.indices;
          Collections.reverse(flist);
         
          Statement stmt = new Statement(new Assignment (aVisitor.id, new FADA_Index(flist), rhs));

          if(inElse) parent.Enclose(stmt, true);
          else parent.Enclose(stmt, false);
        } else {
         
          //bexpr.getOperand1().accept(lhsVisitor);
          //FadaExpression lhs = lhsVisitor.getExpr();
         
         
          System.err.println("StmtVisitor.visit: unknown binary operand " + bexpr.getOperand1() + " " +  expr.getRawSignature());
         
        }
      } else {
        System.err.println("StmtVisitor.visit: unknown binary expression " + expr.getRawSignature());
      }
    } else if(expr instanceof IASTUnaryExpression){
      visit((IASTUnaryExpression)expr);
     
    } else if (expr instanceof IASTFunctionCallExpression){
      ExprVisitor visitor = new ExprVisitor();
      expr.accept(visitor);
     
      Statement stmt = new Statement(new Assignment ("", visitor.getExpr()));
      if(inElse) parent.Enclose(stmt, true);
      else parent.Enclose(stmt, false);
    } else {
      System.err.println("StmtVisitor.visit: unknown expression (" + expr.getClass() + ") " + expr.getRawSignature() );
    }
View Full Code Here

Examples of com.projectlibre.pm.tasks.Assignment

  }
 
  protected void importAssignments(net.sf.mpxj.Task mpxTask, Task task) {
    for (net.sf.mpxj.ResourceAssignment mpxAssignment:mpxTask.getResourceAssignments()){
      MpxAssignmentConverter converter=new MpxAssignmentConverter();
      Assignment assignment=new Assignment();
      assignment.setTask(task);
      converter.from(mpxAssignment, assignment, state);
      task.addAssignment(assignment);
    }
  }
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.