Class SubsequentialTransducers
- java.lang.Object
-
- net.automatalib.util.automaton.transducer.SubsequentialTransducers
-
public final class SubsequentialTransducers extends Object
Utility methods ofSubsequentialTransducer
s.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S,I,T,O>
booleanisOnwardSST(SubsequentialTransducer<S,I,T,O> sst, Collection<? extends I> inputs)
Checks whether a givenSubsequentialTransducer
is 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 <S1,S2,I,T1,T2,O,A extends MutableSubsequentialTransducer<S2,I,T2,O>>
AtoOnwardSST(SubsequentialTransducer<S1,I,T1,O> sst, Collection<? extends I> inputs, A out)
Constructs a new onward subsequential transducer for a givenSST
.static <S1,S2,I,T1,T2,O,A extends MutableSubsequentialTransducer<S2,I,T2,O>>
AtoOnwardSST(SubsequentialTransducer<S1,I,T1,O> sst, Collection<? extends I> inputs, A out, boolean minimize)
Constructs a new onward subsequential transducer for a givenSST
.
-
-
-
Method Detail
-
toOnwardSST
public static <S1,S2,I,T1,T2,O,A extends MutableSubsequentialTransducer<S2,I,T2,O>> A toOnwardSST(SubsequentialTransducer<S1,I,T1,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.- 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 <S1,S2,I,T1,T2,O,A extends MutableSubsequentialTransducer<S2,I,T2,O>> A toOnwardSST(SubsequentialTransducer<S1,I,T1,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.- 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,T,O> boolean isOnwardSST(SubsequentialTransducer<S,I,T,O> sst, Collection<? extends I> inputs)
Checks whether a givenSubsequentialTransducer
is 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
.- Parameters:
sst
- the SST to checkinputs
- the input symbols to consider for this check- Returns:
true
ifsst
is onward,false
otherwise
-
-