Module net.automatalib.util
Class SubsequentialTransducers
java.lang.Object
net.automatalib.util.automaton.transducer.SubsequentialTransducers
Utility methods of
SubsequentialTransducers.-
Method Summary
Modifier and TypeMethodDescriptionstatic <S,I, O> boolean isOnwardSST(SubsequentialTransducer<S, I, ?, O> sst, Collection<? extends I> inputs) Checks whether a givenSubsequentialTransduceris onward, i.e. if for each state (sans initial state) the longest common prefix over its state property and the transition properties of its outgoing edges equalsepsilon.static <S,I, T, O, A extends MutableSubsequentialTransducer<S, I, T, O>>
AtoOnwardSST(SubsequentialTransducer<?, I, ?, O> sst, Collection<? extends I> inputs, A out) Constructs a new onward subsequential transducer for a givenSST.static <S,I, T, O, A extends MutableSubsequentialTransducer<S, I, T, O>>
AtoOnwardSST(SubsequentialTransducer<?, I, ?, O> sst, Collection<? extends I> inputs, A out, boolean minimize) Constructs a new onward subsequential transducer for a givenSST.
-
Method Details
-
toOnwardSST
public static <S,I, A toOnwardSSTT, O, A extends MutableSubsequentialTransducer<S, I, T, O>> (SubsequentialTransducer<?, I, ?, O> sst, Collection<? extends I> inputs, A out) Constructs a new onward subsequential transducer for a givenSST. In an onward SST, for each state except the initial state, the longest common prefix over the state output and the outputs of all outgoing transitions of a state isepsilon. This can be achieved by pushing back the longest common prefix to the transition outputs of the incoming transitions of each state.- Type Parameters:
S- state type (of the output SST)I- input symbol typeT- transition type (of the output SST)O- output symbol typeA- automaton type- Parameters:
sst- the original SSTinputs- the alphabet symbols to consider for this transformationout- the target automaton to write the onward form to- Returns:
out, for convenience
-
toOnwardSST
public static <S,I, A toOnwardSSTT, O, A extends MutableSubsequentialTransducer<S, I, T, O>> (SubsequentialTransducer<?, I, ?, O> sst, Collection<? extends I> inputs, A out, boolean minimize) Constructs a new onward subsequential transducer for a givenSST. In an onward SST, for each state except the initial state, the longest common prefix over the state output and the outputs of all outgoing transitions of a state isepsilon. This can be achieved by pushing back the longest common prefix to the transition outputs of the incoming transitions of each state.- Type Parameters:
S- state type (of the output SST)I- input symbol typeT- transition type (of the output SST)O- output symbol typeA- automaton type- Parameters:
sst- the original SSTinputs- the alphabet symbols to consider for this transformationout- the target automaton to write the onward form tominimize- a flag indicating whether the final result should be minimized- Returns:
out, for convenience
-
isOnwardSST
public static <S,I, boolean isOnwardSSTO> (SubsequentialTransducer<S, I, ?, O> sst, Collection<? extends I> inputs) Checks whether a givenSubsequentialTransduceris onward, i.e. if for each state (sans initial state) the longest common prefix over its state property and the transition properties of its outgoing edges equalsepsilon.- Type Parameters:
S- state typeI- input symbol typeO- output symbol type- Parameters:
sst- the SST to checkinputs- the input symbols to consider for this check- Returns:
trueifsstis onward,falseotherwise
-