Class MealyMachines
- java.lang.Object
-
- net.automatalib.util.automaton.transducer.MealyMachines
-
public final class MealyMachines extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <I,O1,O2,A extends MutableMealyMachine<?,I,?,Pair<O1,O2>>>
Acombine(MealyMachine<?,I,?,O1> mealy1, MealyMachine<?,I,?,O2> mealy2, Collection<? extends I> inputs, A out)
Constructs the product automaton for two Mealy Machines.static <I,O1,O2>
CompactMealy<I,Pair<O1,O2>>combine(MealyMachine<?,I,?,O1> mealy1, MealyMachine<?,I,?,O2> mealy2, Alphabet<I> inputAlphabet)
Constructs the product automaton for two Mealy Machines.static <S,I,T,O,A extends MutableMealyMachine<S,I,T,O>>
Acomplete(MealyMachine<?,I,?,O> mealy, Collection<? extends I> inputs, O undefinedOutput, A out)
Constructs a copy of the given Mealy machine in which every transition (in regard to the specified alphabet) is guaranteed to be defined.static <I,O>
CompactMealy<I,O>complete(MealyMachine<?,I,?,O> mealy, Alphabet<I> inputs, O undefinedOutput)
Constructs a copy of the given Mealy machine in which every transition (in regard to the specified alphabet) is guaranteed to be defined.
-
-
-
Method Detail
-
combine
public static <I,O1,O2> CompactMealy<I,Pair<O1,O2>> combine(MealyMachine<?,I,?,O1> mealy1, MealyMachine<?,I,?,O2> mealy2, Alphabet<I> inputAlphabet)
Constructs the product automaton for two Mealy Machines.- Type Parameters:
I
- input symbol typeO1
- output symbol type of the first Mealy MachineO2
- output symbol type of the second Mealy Machine- Parameters:
mealy1
- the first Mealy Machinemealy2
- the second Mealy MachineinputAlphabet
- the input alphabet of the returned automaton- Returns:
- a new Mealy Machine representing the product automaton of the specified Mealy Machines
-
combine
public static <I,O1,O2,A extends MutableMealyMachine<?,I,?,Pair<O1,O2>>> A combine(MealyMachine<?,I,?,O1> mealy1, MealyMachine<?,I,?,O2> mealy2, Collection<? extends I> inputs, A out)
Constructs the product automaton for two Mealy Machines.- Type Parameters:
I
- input symbol typeO1
- output symbol type of the first Mealy MachineO2
- output symbol type of the second Mealy Machine- Parameters:
mealy1
- the first Mealy Machinemealy2
- the second Mealy Machineinputs
- the input symbols to considerout
- the instance to which the combined automaton should be written- Returns:
out
, for convenience
-
complete
public static <I,O> CompactMealy<I,O> complete(MealyMachine<?,I,?,O> mealy, Alphabet<I> inputs, O undefinedOutput)
Constructs a copy of the given Mealy machine in which every transition (in regard to the specified alphabet) is guaranteed to be defined. This includes adding a sink state if the original Mealy machine has undefined transitions.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
mealy
- the original Mealy machineinputs
- the inputs to consider for completing the automatonundefinedOutput
- the output symbol that should be used for new transitions- Returns:
- a copy of the given Mealy machine in which every transition (in regard to the specified alphabet) is guaranteed to be defined
-
complete
public static <S,I,T,O,A extends MutableMealyMachine<S,I,T,O>> A complete(MealyMachine<?,I,?,O> mealy, Collection<? extends I> inputs, O undefinedOutput, A out)
Constructs a copy of the given Mealy machine in which every transition (in regard to the specified alphabet) is guaranteed to be defined. This includes adding a sink state if the original Mealy machine has undefined transitions.- Type Parameters:
S
- automaton state typeI
- input symbol typeT
- automaton transition typeO
- output symbol typeA
- output automaton type- Parameters:
mealy
- the original Mealy machineinputs
- the inputs to consider for completing the automatonundefinedOutput
- the output symbol that should be used for new transitionsout
- the instance to which the copy should be written- Returns:
out
, for convenience.
-
-