Lookup if any transition exists from current model state using current method
485172
def has_transition(self, state):
        
        if state in self.transitions:
            return True

        if '*' in self.transitions:
            return True

        if '+' in self.transitions and self.transitions['+'].target != state:
            return True

        return False
771927
def getApplicationsTransitionStateNameFromEnum(self, state):
        """"""

        fn = self.function_table.getApplicationsTransitionStateNameFromEnum
        result = fn(state)
        return result
676240
private State nextState(State currentState, int i) {
        switch (currentState) {
            case FREE_TEXT:
                return jumpFromFreeText(str, i);
            case PARAM_START:
                return jumpFromParamStart(str, i);
            case PARAM:
                return jumpFromParam(str, i);
            case PARAM_END:
                return jumpFromParamEnd(str, i);
            case ESCAPE_CHAR:
                return State.FREE_TEXT;
            // Should never go here
            default:
                throw UncheckedTemplateException.invalidStateException(currentState);
        }
    }
315294
def _match_transition(self, transition):
        """"""
        return (self.names == '*'
                or transition in self.names
                or transition.name in self.names)
1295737
def find_previous(self):
        """"""
        state = self.find(changed=False, forward=False, rehighlight=False,
                          multiline_replace_check=False)
        self.editor.setFocus()
        return state
1072050
def select_transition(name, from_state, *conditions)
      if choice_transition?(name, from_state)
        match_transition_with(name, from_state, *conditions)
      else
        match_transition(name, from_state)
      end
    end
676308
def _check_transition_validity(self, check_transition):
        
        valid, message = super(PreemptiveConcurrencyState, self)._check_transition_validity(check_transition)
        if not valid:
            return False, message

        # Only transitions to the parent state are allowed

        if check_transition.to_state != self.state_id:
            return False, "Only transitions to the parent state are allowed"

        return True, message
518667
def have_current_state_entry(self, wid, key):
        ''
        cscoll = self.current_state()
        c_state = cscoll.get(wid, {})
        return key in c_state
692081
@Nullable
    public TransitionValues getTransitionValues(@NonNull View view, boolean start) {
        if (mParent != null) {
            return mParent.getTransitionValues(view, start);
        }
        TransitionValuesMaps valuesMaps = start ? mStartValues : mEndValues;
        return valuesMaps.viewValues.get(view);
    }
1029395
function(model) {
		var _d = this._d; // quicker lookup
		if (!_d.hasData) {
			// if we've never rendered data yet, queue up a reset collection
			// this probably means we just finished our very first fetch
			// reset needed to clear out loading / no data state..
			return this.resetCollection();
		}
		_d.modelChanges[model.cid] = {t: 'add', m: model};
		this.updateViews();
	}
382336
def get_transition(self,  # suppress(too-many-arguments)
                       line,
                       line_index,
                       column,
                       is_escaped,
                       comment_system_transitions,
                       eof=False):
        """"""
        parser_transition = {
            STATE_IN_COMMENT: InCommentParser,
            STATE_IN_QUOTE: InQuoteParser
        }

        (state,
         start_state_from,
         waiting_until) = comment_system_transitions.from_text(line,
                                                               line_index,
                                                               column,
                                                               is_escaped)

        # We need to move ahead by a certain number of characters
        # if we hit a new state
        if state != STATE_IN_TEXT:
            return (parser_transition[state](start_state_from,
                                             waiting_until),
                    start_state_from[1] - column,
                    None)
        else:
            return (self, 1, None)
11995
def transitions(self):
        """"""
        if self._transitions is not None:
            return self._transitions
        transitions = self.array.astype(np.float)
        transitions /= transitions.sum(1)[:, np.newaxis]
        self._transitions = transitions
        return transitions
551155
def add_transitions_from_selected_state_to_parent():
    
    task_string = "create transition"
    sub_task_string = "to parent state"

    selected_state_m, msg = get_selected_single_state_model_and_check_for_its_parent()
    if selected_state_m is None:
        logger.warning("Can not {0} {1}: {2}".format(task_string, sub_task_string, msg))
        return
    logger.debug("Check to {0} {1} ...".format(task_string, sub_task_string))
    state = selected_state_m.state
    parent_state = state.parent

    # find all possible from outcomes
    from_outcomes = get_all_outcomes_except_of_abort_and_preempt(state)

    # find lowest valid outcome id
    possible_oc_ids = [oc_id for oc_id in state.parent.outcomes.keys() if oc_id >= 0]
    possible_oc_ids.sort()
    to_outcome = state.parent.outcomes[possible_oc_ids[0]]

    oc_connected_to_parent = [oc for oc in from_outcomes if is_outcome_connect_to_state(oc, parent_state.state_id)]
    oc_not_connected = [oc for oc in from_outcomes if not state.parent.get_transition_for_outcome(state, oc)]
    if all(oc in oc_connected_to_parent for oc in from_outcomes):
        logger.info("Remove transition {0} because all outcomes are connected to it.".format(sub_task_string))
        for from_outcome in oc_connected_to_parent:
            transition = parent_state.get_transition_for_outcome(state, from_outcome)
            parent_state.remove(transition)
    elif oc_not_connected:
        logger.debug("Create transition {0} ... ".format(sub_task_string))
        for from_outcome in from_outcomes:
            parent_state.add_transition(state.state_id, from_outcome.outcome_id,
                                        parent_state.state_id, to_outcome.outcome_id)
    else:
        if remove_transitions_if_target_is_the_same(from_outcomes):
            logger.info("Removed transitions origin from outcomes of selected state {0}"
                        "because all point to the same target.".format(sub_task_string))
            return add_transitions_from_selected_state_to_parent()
        logger.info("Will not create transition {0}: Not clear situation of connected transitions."
                    "There will be no transitions to other states be touched.".format(sub_task_string))

    return True
935446
private static void checkTransition(Map<Transition, Collection<TileRef>> transitions,
                                        MapTransitionExtractor extractor,
                                        Tile tile)
    {
        final Transition transition = extractor.getTransition(tile);
        if (transition != null)
        {
            getTiles(transitions, transition).add(new TileRef(tile));

            final Transition symetric = new Transition(transition.getType().getSymetric(),
                                                       transition.getOut(),
                                                       transition.getIn());
            getTiles(transitions, symetric).add(new TileRef(tile));
        }
    }
1099232
def get_current_step(self):
        
        step = self.sess.run(self.model.global_step)
        return step
1270162
function (oldInfos, newInfos, transition) {
      _emberMetalRun_loop.default.once(this, this.trigger, 'willTransition', transition);

      if (_emberMetalProperty_get.get(this, 'namespace').LOG_TRANSITIONS) {
        _emberMetalLogger.default.log('Preparing to transition from \'' + EmberRouter._routePath(oldInfos) + '\' to \'' + EmberRouter._routePath(newInfos) + '\'');
      }
    }
1233033
def transition_to(path, current_state=self.current_state)
      path = path.to_s
      state = current_state || self
      exit_states = []

      # Find the nearest parent state on the path of the current state which
      # has a sub-state at the given path
      new_states = state.find_states(path)
      while(!new_states) do
        exit_states << state
        state = state.parent_state
        raise(StateNotFound, transition_error(path)) unless state
        new_states = state.find_states(path)
      end

      # The first time we enter a state, the state_manager gets entered as well
      new_states.unshift(self) unless has_state?

      # Can only transition to leaf states
      # TODO: transition to the initial_state of the state?
      raise(InvalidTransition, transition_error(path)) unless new_states.last.leaf?

      enter_states = new_states - exit_states
      exit_states = exit_states - new_states

      from_state = current_state
      # TODO: does it make more sense to throw an error instead of allowing
      # a transition to the current state?
      to_state = enter_states.last || from_state

      run_before_callbacks(from_state, to_state, current_event, enter_states, exit_states)

      # Set the state on the underlying resource
      self.current_state = to_state

      run_after_callbacks(from_state, to_state, current_event, enter_states, exit_states)
    end