Package owl.automaton
Class Views
- java.lang.Object
-
- owl.automaton.Views
-
public final class Views extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Views.Filter<S>
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S> Automaton<Optional<S>,?>
complete(Automaton<S,?> automaton)
static <S> Automaton<S,ParityAcceptance>
convertParity(Automaton<S,? extends ParityAcceptance> automaton, ParityAcceptance.Parity toParity)
static <S,A extends EmersonLeiAcceptance>
Automaton<Integer,A>dropStateLabels(Automaton<S,? extends A> automaton)
static <S,A extends EmersonLeiAcceptance>
Automaton<S,A>filtered(Automaton<S,A> automaton, Views.Filter<S> filter)
Create a filtered view on the passed automaton.static <S,T,A extends EmersonLeiAcceptance>
Automaton<T,A>quotientAutomaton(Automaton<S,A> automaton, Function<? super S,? extends T> mappingFunction)
This is essentiallyfmap :: (S -> T) -> Automaton<S, A> -> Automaton<T, A>
.static <S,A extends EmersonLeiAcceptance>
Automaton<S,A>replaceInitialStates(Automaton<S,? extends A> automaton, Set<? extends S> initialStates)
static <S,A extends EmersonLeiAcceptance>
Automaton<Pair<S,ImmutableBitSet>,A>stateAcceptanceAutomaton(Automaton<S,? extends A> automaton)
-
-
-
Method Detail
-
filtered
public static <S,A extends EmersonLeiAcceptance> Automaton<S,A> filtered(Automaton<S,A> automaton, Views.Filter<S> filter)
Create a filtered view on the passed automaton. The returned automaton only contains states that are reachable from the initial states. States can be protected from removal by marking them as initial. It is assumed that passed automaton is not changed.- Type Parameters:
S
- the type of the statesA
- the type of- Parameters:
automaton
- the backing automatonfilter
- the filter defined on the automaton- Returns:
- a on-the-fly generated view on the automaton.
-
replaceInitialStates
public static <S,A extends EmersonLeiAcceptance> Automaton<S,A> replaceInitialStates(Automaton<S,? extends A> automaton, Set<? extends S> initialStates)
-
quotientAutomaton
public static <S,T,A extends EmersonLeiAcceptance> Automaton<T,A> quotientAutomaton(Automaton<S,A> automaton, Function<? super S,? extends T> mappingFunction)
This is essentiallyfmap :: (S -> T) -> Automaton<S, A> -> Automaton<T, A>
. When the function is injective, the effect is just replacing states of type S with states of type T. If it is not, the result will be a quotient wrt. the equivalence classes induced by the preimages.- Type Parameters:
S
- input state typeT
- output state typeA
- acceptance condition- Parameters:
automaton
- input automatonmappingFunction
- function from S to T- Returns:
- Output automaton where states are mapped from S to T (and possibly quotiented)
-
stateAcceptanceAutomaton
public static <S,A extends EmersonLeiAcceptance> Automaton<Pair<S,ImmutableBitSet>,A> stateAcceptanceAutomaton(Automaton<S,? extends A> automaton)
-
dropStateLabels
public static <S,A extends EmersonLeiAcceptance> Automaton<Integer,A> dropStateLabels(Automaton<S,? extends A> automaton)
-
convertParity
public static <S> Automaton<S,ParityAcceptance> convertParity(Automaton<S,? extends ParityAcceptance> automaton, ParityAcceptance.Parity toParity)
-
-