Examples of State


Examples of DisplayProject.TMSchema.State

        protected void paintToImage(Component c, Image image, Graphics g,
                                    int w, int h, Object[] args) {
            Skin skin = (Skin)args[0];
            Part part = skin.part;
            State state = (State)args[1];
            if (state == null) {
                state = skin.state;
            }
            if (c == null) {
                c = skin.component;
View Full Code Here

Examples of EMIDA.State

                XmlNode stateNameNode =  (XmlNode)nodeInfo.children.elementAt(1);
                String stateNameValue = stateNameNode.nodeValue;

                catMidlet.addState(stateCodeValue, stateNameValue);
               
                State state = new State(stateCodeValue,stateNameValue);
                if (catMidlet.statesInMemory != null){                   
                    catMidlet.statesInMemory.addElement(state);
                }               
             }
            
View Full Code Here

Examples of RemoteCluster.JobStatus.State

       
        String eachPort = actorAddress.substring(actorAddress.length()-4);
        if (url.equals(hostAddress) && eachPort.equals(port))
          continue;
        ClusterState clusterState = new ClusterState();
        ClusterState.memberStates.put(url + ":" + eachPort, clusterState.new State(false, true));
        System.out.println("Member : " + url + ":" + eachPort);
      }
    }
   
    personalG = system.actorOf(Props.create(Guard.class, masterUrl), "guard");
View Full Code Here

Examples of at.molindo.thirdparty.org.compass.core.util.concurrent.ConcurrentLinkedHashMap.Node.State

          if (node.casState(State.LINKED, State.UNLINKING)) {
            node.getNext().setPrev(head);
            node.setState(State.UNLINKED);
            return node;
          }
          State state = node.getState();
          if (state == State.SENTINEL) {
            return null;
          }
          continue; // retry CAS as the node is being linked by offer
        }
View Full Code Here

Examples of at.ssw.coco.lib.model.scanners.types.State

          case SINGLE_LINE_COMMENT_PRODUCTIONS_INLINE_CODE:
          case CHARACTER_PRODUCTIONS_INLINE_CODE:
          case STRING_PRODUCTIONS_INLINE_CODE:
           
            Last last;
            State newState = getNextState();
            switch (ch) {
            case '/':
              last = Last.SLASH;
              break;
View Full Code Here

Examples of avrora.sim.State

        }

        public TestResult match(Throwable t) {
            if (t != null) return super.match(t);

            State state = simulator.getState();
            Iterator i = predicates.iterator();

            try {
                while (i.hasNext()) {
                    StatePredicate p = (StatePredicate)i.next();
View Full Code Here

Examples of br.com.visualmidia.business.State

    private void fillCombo() {
        try {
          cityCombo.removeAll();
          int comboSelect = 0;
         
            State state = (State) system.query(new GetStates(stateCombo.getText()));
            List<City> cities = state.getCityList();
           
            for (City city : cities) {
              cityCombo.add(city.getCityName());
             
                if (gd.get("city").toString().equals(city.getCityName())) {
View Full Code Here

Examples of cc.mallet.fst.MEMM.State


  public void printInstanceLists ()
  {
    for (int i = 0; i < memm.numStates(); i++) {
      State state = (State) memm.getState (i);
      InstanceList training = state.trainingSet;
      System.out.println ("State "+i+" : "+state.getName());
      if (training == null) {
        System.out.println ("No data");
        continue;
      }
      for (int j = 0; j < training.size(); j++) {
        Instance inst = training.get (j);
        System.out.println ("From : "+state.getName()+" To : "+inst.getTarget());
        System.out.println ("Instance "+j);
        System.out.println (inst.getTarget());
        System.out.println (inst.getData());
      }
    }
View Full Code Here

Examples of cc.mallet.fst.Transducer.State

          if (nodes[ip][i] == null) logger.fine ("nodes[ip][i] is NULL");
          else if (nodes[ip][i].alpha == Transducer.IMPOSSIBLE_WEIGHT) logger.fine ("nodes[ip][i].alpha is -Inf");
          logger.fine ("-INFINITE weight or NULL...skipping");
          continue;
        }
        State s = t.getState(i);

        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        if (logger.isLoggable (Level.FINE))
          logger.fine (" Starting Forward transition iteration from state "
              + s.getName() + " on input " + input.get(ip).toString()
              + " and output "
              + (output==null ? "(null)" : output.get(ip).toString()));
        while (iter.hasNext()) {
          State destination = iter.nextState();
          boolean legalTransition = true;
          // check constraints to see if node at <ip,i> can transition to destination
          if (ip+1 < constraints.length && constraints[ip+1] > 0 && ((constraints[ip+1]-1) != destination.getIndex())) {
            logger.fine ("Destination state does not match positive constraint. Assigning -infinite weight. position="+(ip+1)+", constraint="+(constraints[ip+1]-1)+", source ="+i+", destination="+destination.getIndex());
            legalTransition = false;
          }
          else if (((ip+1) < constraints.length) && constraints[ip+1] < 0 && (-(constraints[ip+1]+1) == destination.getIndex())) {
            logger.fine ("Destination state does not match negative constraint. Assigning -infinite weight. position="+(ip+1)+", constraint="+(constraints[ip+1]+1)+", destination="+destination.getIndex());
            legalTransition = false;
          }

          if (logger.isLoggable (Level.FINE))
            logger.fine ("Forward Lattice[inputPos="+ip
                +"][source="+s.getName()
                +"][dest="+destination.getName()+"]");
          LatticeNode destinationNode = getLatticeNode (ip+1, destination.getIndex());
          destinationNode.output = iter.getOutput();
          double transitionWeight = iter.getWeight();
          if (legalTransition) {
            //if (logger.isLoggable (Level.FINE))
            logger.fine ("transitionWeight="+transitionWeight
                +" nodes["+ip+"]["+i+"].alpha="+nodes[ip][i].alpha
                +" destinationNode.alpha="+destinationNode.alpha);
            destinationNode.alpha = Transducer.sumLogProb (destinationNode.alpha,
                nodes[ip][i].alpha + transitionWeight);
            //System.out.println ("destinationNode.alpha <- "+destinationNode.alpha);
            logger.fine ("Set alpha of latticeNode at ip = "+ (ip+1) + " stateIndex = " + destination.getIndex() + ", destinationNode.alpha = " + destinationNode.alpha);
          }
          else {
            // this is an illegal transition according to our
            // constraints, so set its prob to 0 . NO, alpha's are
            // unnormalized weights...set to -Inf //
            // destinationNode.alpha = 0.0;
//            destinationNode.alpha = IMPOSSIBLE_WEIGHT;
            logger.fine ("Illegal transition from state " + i + " to state " + destination.getIndex() + ". Setting alpha to -Inf");
          }
        }
      }

    // Calculate total weight of Lattice.  This is the normalizer
    totalWeight = Transducer.IMPOSSIBLE_WEIGHT;
    for (int i = 0; i < numStates; i++)
      if (nodes[latticeLength-1][i] != null) {
        // Note: actually we could sum at any ip index,
        // the choice of latticeLength-1 is arbitrary
        //System.out.println ("Ending alpha, state["+i+"] = "+nodes[latticeLength-1][i].alpha);
        //System.out.println ("Ending beta,  state["+i+"] = "+getState(i).finalWeight);
        if (constraints[latticeLength-1] > 0 && i != constraints[latticeLength-1]-1)
          continue;
        if (constraints[latticeLength-1] < 0 && -i == constraints[latticeLength-1]+1)
          continue;
        logger.fine ("Summing final lattice weight. state="+i+", alpha="+nodes[latticeLength-1][i].alpha + ", final weight = "+t.getState(i).getFinalWeight());
        totalWeight = Transducer.sumLogProb (totalWeight,
            (nodes[latticeLength-1][i].alpha + t.getState(i).getFinalWeight()));
      }
    // Weight is now an "unnormalized weight" of the entire Lattice
    //assert (weight >= 0) : "weight = "+weight;

    // If the sequence has -infinite weight, just return.
    // Usefully this avoids calling any incrementX methods.
    // It also relies on the fact that the gammas[][] and .alpha and .beta values
    // are already initialized to values that reflect -infinite weight
    // xxx Although perhaps not all (alphas,betas) exactly correctly reflecting?
    if (totalWeight == Transducer.IMPOSSIBLE_WEIGHT)
      return;

    // Backward pass
    for (int i = 0; i < numStates; i++)
      if (nodes[latticeLength-1][i] != null) {
        State s = t.getState(i);
        nodes[latticeLength-1][i].beta = s.getFinalWeight();
        gammas[latticeLength-1][i] =
          nodes[latticeLength-1][i].alpha + nodes[latticeLength-1][i].beta - totalWeight;
        if (incrementor != null) {
          double p = Math.exp(gammas[latticeLength-1][i]);
          assert (p >= 0.0 && p <= 1.0 && !Double.isNaN(p))  : "p="+p+" gamma="+gammas[latticeLength-1][i];
          incrementor.incrementFinalState(s, p);
        }
      }
    for (int ip = latticeLength-2; ip >= 0; ip--) {
      for (int i = 0; i < numStates; i++) {
        if (nodes[ip][i] == null || nodes[ip][i].alpha == Transducer.IMPOSSIBLE_WEIGHT)
          // Note that skipping here based on alpha means that beta values won't
          // be correct, but since alpha is -infinite anyway, it shouldn't matter.
          continue;
        State s = t.getState(i);
        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        while (iter.hasNext()) {
          State destination = iter.nextState();
          if (logger.isLoggable (Level.FINE))
            logger.fine ("Backward Lattice[inputPos="+ip
                +"][source="+s.getName()
                +"][dest="+destination.getName()+"]");
          int j = destination.getIndex();
          LatticeNode destinationNode = nodes[ip+1][j];
          if (destinationNode != null) {
            double transitionWeight = iter.getWeight();
            assert (!Double.isNaN(transitionWeight));
            //              assert (transitionWeight >= 0);  Not necessarily
View Full Code Here

Examples of center.task.State

      try {
        res.info.calculate(TimeState.getInstance(TimeState.Time.before, State.PROCESSING), res);
      } catch (Throwable e) {
        e.printStackTrace();
      }
      State st;
      try {
        st = po.process(res);
        res.setPrmByFullName("tsk", "STATUS_ID", st, false);
        res.info.calculate(TimeState.getInstance(TimeState.Time.after, State.PROCESSING), res);
      } catch (Throwable e) {
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.