Interface StateIDs<S>

Type Parameters:
S - state type of the automaton
All Known Implementing Classes:
AbstractCompact, AbstractCompactDeterministic, AbstractCompactMTS, AbstractCompactSimpleDeterministic, AbstractCompactSimpleNondet, AbstractDefaultSEVPA, AbstractFastMutable, AbstractFastMutableDet, AbstractFastMutableNondet, AbstractSEVPA, CompactDFA, CompactMealy, CompactMMLT, CompactMoore, CompactMTS, CompactNFA, CompactSimpleAutomaton, CompactSST, CompactTransitionOutput, DefaultNSEVPA, DefaultOneSEVPA, FastDFA, FastMealy, FastMoore, FastNFA, FastProbMealy, ProductOneSEVPA, ReducedMMLTSemantics, SimpleStateIDs, UniversalCompactDet, UniversalCompactDetAutomaton, UniversalCompactSimpleDet

public interface StateIDs<S>
An interface for translating between automaton states and their primitive representations as integers.
  • Method Summary

    Modifier and Type
    Method
    Description
    getState(int id)
    Return for a given id the state of the automaton identified by it.
    int
    getStateId(S state)
    Returns for a given state of the automaton an integer uniquely identifying the state.
  • Method Details

    • getStateId

      int getStateId(S state)
      Returns for a given state of the automaton an integer uniquely identifying the state. The returned ids should be within the range of the number of states of the automaton so that they can be used for array-based indexing.
      Parameters:
      state - the state whose id should be retrieved
      Returns:
      the (positive) id of the given automaton state
      Throws:
      IllegalArgumentException - if state does not belong to the automaton.
    • getState

      S getState(int id)
      Return for a given id the state of the automaton identified by it.
      Parameters:
      id - the id of the state to be returned
      Returns:
      the automaton state identified by the given id.
      Throws:
      IndexOutOfBoundsException - if the given id does not identify a state of the automaton.