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>
-
Field Summary
Fields Modifier and Type Field Description static OwlModule<OwlModule.Transformer>
COMPLETE_MODULE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <S> Automaton<S,?>
complete(Automaton<S,?> automaton, S trapState)
static <S,A extends OmegaAcceptance>
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 OmegaAcceptance>
Automaton<T,A>quotientAutomaton(Automaton<S,A> automaton, Function<S,T> mappingFunction)
This is essentiallyfmap :: (S -> T) -> Automaton<S,A> -> Automaton<T,A>
.
-
-
-
Field Detail
-
COMPLETE_MODULE
public static final OwlModule<OwlModule.Transformer> COMPLETE_MODULE
-
-
Method Detail
-
filtered
public static <S,A extends OmegaAcceptance> 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.
-
quotientAutomaton
public static <S,T,A extends OmegaAcceptance> Automaton<T,A> quotientAutomaton(Automaton<S,A> automaton, Function<S,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)
-
-