Examples of State


Examples of com.yahoo.labs.taxomo.util.State

    // Get nodes that can be merged
    HashSet<State> mergeableNodes = new HashSet<State>();
    HashSet<State> examined = new HashSet<State>();
    for (State node : allowedStates) {
      State parentNode = node.getParent();
      if (parentNode != null && !examined.contains(parentNode)) {
        examined.add(parentNode);
        if (parentNode.hasOnlyChildrenInSet(allowedStates)) {
          mergeableNodes.add(parentNode);
        }

      }
    }
View Full Code Here

Examples of com.zylin.zpu.simulator.State

    public StatKeeper(Machine simulator)
    {
        this.simulator=simulator;
    for (int i=0; i<state.length; i++)
    {
      state[i]=new State();
    }
    }
View Full Code Here

Examples of de.danet.an.workflow.omgcore.WfExecutionObject.State

      String key = (String)i.next();
      Collections.sort ((List)transByTo.get(key), transComp);
  }
  for (Iterator i = process.stepsLocal().iterator (); i.hasNext(); ) {
      ExtActivityLocal a = (ExtActivityLocal)i.next();
      State as = a.typedState();
      String ak = a.key();
      if (as.isSameOrSubState(NotRunningState.NOT_STARTED)) {
    if (as.isSameOrSubState (NotStartedState.STARTABLE)) {
        startableActs.put (ak, a);
    } else if (as.isSameOrSubState (NotStartedState.UNKNOWN)
         && (((Collection)transByTo.get(ak)).size () == 0)) {
        a.setStartable (null, false);
        if (logger.isDebugEnabled()) {
      logger.debug (a + " set to startable");
        }
        startableActs.put (ak, a);
    }
      } else if (as.isSameOrSubState (State.CLOSED)) {
    closedActs.put (ak, a);
      } else {
    runningActs.put (ak, a);
      }
  }
View Full Code Here

Examples of de.nameless.gameEngine.util.StateMachine.State

    selectUnitAction = new Action("selectUnitAction");   
    deSelectUnitAction = new Action("deSelectUnitAction");   
    moveUnitAction = new Action("moveUnitAction");   
    attackUnitAction = new Action("attackUnitAction");   
   
    startState = new State("Start")
    unitSelected = new State("unitSelected");
    unitMovedState = new State("unitMoved");   
   
    startState.addTransition(selectUnitAction, unitSelected);
    unitSelected.addTransition(deSelectUnitAction, startState);
    unitSelected.addTransition(moveUnitAction, unitMovedState);
    unitMovedState.addTransition(moveUnitAction, startState);
View Full Code Here

Examples of dk.brics.automaton.State

public class AutomatonOperation {


    public static Automaton makeAcceptAllOfLength(int length, int[] alphabet) {
        Automaton auto = new Automaton();
        State start = new State();
        State tmp = start;
        State last = start;

        for (int i = 0; i < length; i++) {
            last = new State();
            for (int k : alphabet) {
                tmp.addTransition(new Transition(FiniteAutomaton.getCharFromInt(k), last));
            }
            tmp = last;

        }
        last.setAccept(true);
        auto.setInitialState(start);
        return auto;
    }
View Full Code Here

Examples of dk.brics.jwig.analysis.graph.State

    private Set<State> findStatesWithManyIngoingEdges(StateMachine stateMachine) {
        Map<State, Integer> inCount = new HashMap<State, Integer>();
        final Set<State> allStates = stateMachine.getAllStates();
        for (State state : allStates) {
            for (Transition transition : state.getTransitions()) {
                final State target = transition.getTarget();
                if (target != null) {
                    if (!inCount.containsKey(target))
                        inCount.put(target, 0);
                    Integer count = inCount.get(target);
                    inCount.put(target, count + 1);
View Full Code Here

Examples of edu.cmu.sphinx.fst.State

        State[] oldToNewStateMap = new State[fst.getNumStates()];
        State[] newToOldStateMap = new State[fst.getNumStates()];

        int numStates = fst.getNumStates();
        for (int i = 0; i < numStates; i++) {
            State s = fst.getState(i);
            // Add non-epsilon arcs
            State newState = new State(s.getFinalWeight());
            res.addState(newState);
            oldToNewStateMap[s.getId()] = newState;
            newToOldStateMap[newState.getId()] = s;
            if (newState.getId() == fst.getStart().getId()) {
                res.setStart(newState);
            }
        }

        for (int i = 0; i < numStates; i++) {
            State s = fst.getState(i);
            // Add non-epsilon arcs
            State newState = oldToNewStateMap[s.getId()];
            int numArcs = s.getNumArcs();
            for (int j = 0; j < numArcs; j++) {
                Arc a = s.getArc(j);
                if ((a.getIlabel() != 0) || (a.getOlabel() != 0)) {
                    newState.addArc(new Arc(a.getIlabel(), a.getOlabel(), a
                            .getWeight(), oldToNewStateMap[a.getNextState()
                            .getId()]));
                }
            }

            // Compute e-Closure
            if (cl[s.getId()] == null) {
                calcClosure(fst, s, cl, semiring);
            }
        }

        // augment fst with arcs generated from epsilon moves.
        numStates = res.getNumStates();
        for (int i = 0; i < numStates; i++) {
            State s = res.getState(i);
            State oldState = newToOldStateMap[s.getId()];
            if (cl[oldState.getId()] != null) {
                for (State pathFinalState : cl[oldState.getId()].keySet()) {
                    State s1 = pathFinalState;
                    if (s1.getFinalWeight() != semiring.zero()) {
                        s.setFinalWeight(semiring.plus(s.getFinalWeight(),
                                semiring.times(getPathWeight(oldState, s1, cl),
                                        s1.getFinalWeight())));
                    }
                    int numArcs = s1.getNumArcs();
                    for (int j = 0; j < numArcs; j++) {
                        Arc a = s1.getArc(j);
                        if ((a.getIlabel() != 0) || (a.getOlabel() != 0)) {
                            Arc newArc = new Arc(a.getIlabel(), a.getOlabel(),
                                    semiring.times(a.getWeight(),
                                            getPathWeight(oldState, s1, cl)),
                                    oldToNewStateMap[a.getNextState().getId()]);
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.obl.State

            // see if there are any states with nonempty obligation sets.
            //
            Map<Obligation, State> leakedObligationMap = new HashMap<Obligation, State>();
            StateSet factAtExit = dataflow.getResultFact(cfg.getExit());
            for (Iterator<State> i = factAtExit.stateIterator(); i.hasNext();) {
                State state = i.next();
                checkStateForLeakedObligations(state, leakedObligationMap);
            }

            //
            // Report a separate BugInstance for each Obligation,State pair.
            // (Two different obligations may be leaked in the same state.)
            //
            for (Map.Entry<Obligation, State> entry : leakedObligationMap.entrySet()) {
                Obligation obligation = entry.getKey();
                State state = entry.getValue();
                reportWarning(obligation, state, factAtExit);
            }
            // TODO: closing of nonexistent resources

        }
View Full Code Here

Examples of flex2.compiler.mxml.rep.StatesModel.State

            list.add(indent, "states = [", 0);
       
            indent += StatesGenerator.INDENT;
            for (Iterator<String> iter = states.iterator(); iter.hasNext())
            {
                State state = (State) model.stateByName((String)iter.next());
                if (state != null)
                {
                    state.getDefinitionBody(list, indent, bindingsQueue);
                    if (iter.hasNext()) list.add(indent, ",", 0);
                }
            }
            indent = indent.substring(0, indent.length() - INDENT.length());
            list.add(indent, "];", 0);
View Full Code Here

Examples of flexjson.model.State

    @Test
    public void confirmImmutabilityOfDefaultTypeTransformers() {

        // Default is not modifiable
        TypeTransformerMap typeTransformerMap = TransformerUtil.getDefaultTypeTransformers();
        typeTransformerMap.getTransformer(new State());
        assertFalse("TypeTransformerMap should not contain this key", typeTransformerMap.containsKey(State.class));

    }
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.