Class NFAs
- java.lang.Object
-
- net.automatalib.util.automaton.fsa.NFAs
-
public final class NFAs extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <I,S,A extends MutableNFA<S,I>>
Aand(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the conjunction ("and") of two NFAs, and stores the result in a given mutable NFA.static <I> CompactNFA<I>
and(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the conjunction ("and") of two NFAs, and returns the result as a new NFA.static <I,S,A extends MutableNFA<S,I>>
Acombine(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out, AcceptanceCombiner combiner)
Most general way of combining two NFAs.static <I> CompactNFA<I>
combine(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet, AcceptanceCombiner combiner)
Most general way of combining two NFAs.static <I,A extends NFA<?,I> & InputAlphabetHolder<I>>
CompactDFA<I>determinize(A nfa)
static <I,A extends NFA<?,I> & InputAlphabetHolder<I>>
CompactDFA<I>determinize(A nfa, boolean partial, boolean minimize)
static <I> void
determinize(NFA<?,I> nfa, Collection<? extends I> inputs, MutableDFA<?,I> out)
static <I> void
determinize(NFA<?,I> nfa, Collection<? extends I> inputs, MutableDFA<?,I> out, boolean partial, boolean minimize)
static <I> CompactDFA<I>
determinize(NFA<?,I> nfa, Alphabet<I> inputAlphabet)
static <I> CompactDFA<I>
determinize(NFA<?,I> nfa, Alphabet<I> inputAlphabet, boolean partial, boolean minimize)
static <I,S,A extends MutableNFA<S,I>>
Aequiv(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the equivalence ("<=>") of two NFAs, and stores the result in a given mutable NFA.static <I> CompactNFA<I>
equiv(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the equivalence ("<=>") of two NFAs, and returns the result as a new NFA.static <I,S,A extends MutableNFA<S,I>>
Aimpl(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the implication ("=>") of two NFAs, and stores the result in a given mutable NFA.static <I> CompactNFA<I>
impl(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the implication ("=>") of two NFAs, and returns the result as a new NFA.static <I,S,A extends MutableNFA<S,I>>
Aor(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the disjunction ("or") of two NFAs, and stores the result in a given mutable NFA.static <I> CompactNFA<I>
or(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the disjunction ("or") of two NFAs, and returns the result as a new NFA.static <I,S,A extends MutableNFA<S,I>>
Axor(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the exclusive-or ("xor") of two NFAs, and stores the result in a given mutable NFA.static <I> CompactNFA<I>
xor(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the exclusive-or ("xor") of two NFAs, and returns the result as a new NFA.
-
-
-
Method Detail
-
combine
public static <I> CompactNFA<I> combine(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet, AcceptanceCombiner combiner)
Most general way of combining two NFAs. The behavior is the same as of the abovecombine(NFA, NFA, Collection, MutableNFA, AcceptanceCombiner)
, but the result automaton is automatically created as aCompactNFA
.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputAlphabet
- the input alphabetcombiner
- combination method for acceptance values- Returns:
- a new NFA representing the combination of the specified NFAs
-
combine
public static <I,S,A extends MutableNFA<S,I>> A combine(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out, AcceptanceCombiner combiner)
Most general way of combining two NFAs. TheAcceptanceCombiner
specified via thecombiner
parameter specifies how acceptance values of the NFAs will be combined to an acceptance value in the result NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputs
- the input symbols to considerout
- the mutable NFA for storing the resultcombiner
- combination method for acceptance values- Returns:
out
, for convenience
-
and
public static <I> CompactNFA<I> and(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the conjunction ("and") of two NFAs, and returns the result as a new NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputAlphabet
- the input alphabet- Returns:
- a new NFA representing the conjunction of the specified NFA
-
and
public static <I,S,A extends MutableNFA<S,I>> A and(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the conjunction ("and") of two NFAs, and stores the result in a given mutable NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputs
- the input symbols to considerout
- a mutable NFA for storing the result- Returns:
out
, for convenience
-
or
public static <I> CompactNFA<I> or(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the disjunction ("or") of two NFAs, and returns the result as a new NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputAlphabet
- the input alphabet- Returns:
- a new NFA representing the conjunction of the specified NFA
-
or
public static <I,S,A extends MutableNFA<S,I>> A or(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the disjunction ("or") of two NFAs, and stores the result in a given mutable NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputs
- the input symbols to considerout
- a mutable NFA for storing the result- Returns:
out
, for convenience
-
xor
public static <I> CompactNFA<I> xor(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the exclusive-or ("xor") of two NFAs, and returns the result as a new NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputAlphabet
- the input alphabet- Returns:
- a new NFA representing the conjunction of the specified NFA
-
xor
public static <I,S,A extends MutableNFA<S,I>> A xor(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the exclusive-or ("xor") of two NFAs, and stores the result in a given mutable NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputs
- the input symbols to considerout
- a mutable NFA for storing the result- Returns:
out
, for convenience
-
equiv
public static <I> CompactNFA<I> equiv(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the equivalence ("<=>") of two NFAs, and returns the result as a new NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputAlphabet
- the input alphabet- Returns:
- a new NFA representing the conjunction of the specified NFA
-
equiv
public static <I,S,A extends MutableNFA<S,I>> A equiv(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the equivalence ("<=>") of two NFAs, and stores the result in a given mutable NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputs
- the input symbols to considerout
- a mutable NFA for storing the result- Returns:
out
, for convenience
-
impl
public static <I> CompactNFA<I> impl(NFA<?,I> nfa1, NFA<?,I> nfa2, Alphabet<I> inputAlphabet)
Calculates the implication ("=>") of two NFAs, and returns the result as a new NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputAlphabet
- the input alphabet- Returns:
- a new NFA representing the conjunction of the specified NFA
-
impl
public static <I,S,A extends MutableNFA<S,I>> A impl(NFA<?,I> nfa1, NFA<?,I> nfa2, Collection<? extends I> inputs, A out)
Calculates the implication ("=>") of two NFAs, and stores the result in a given mutable NFA.- Parameters:
nfa1
- the first NFAnfa2
- the second NFAinputs
- the input symbols to considerout
- a mutable NFA for storing the result- Returns:
out
, for convenience
-
determinize
public static <I> CompactDFA<I> determinize(NFA<?,I> nfa, Alphabet<I> inputAlphabet)
-
determinize
public static <I> CompactDFA<I> determinize(NFA<?,I> nfa, Alphabet<I> inputAlphabet, boolean partial, boolean minimize)
-
determinize
public static <I> void determinize(NFA<?,I> nfa, Collection<? extends I> inputs, MutableDFA<?,I> out, boolean partial, boolean minimize)
-
determinize
public static <I,A extends NFA<?,I> & InputAlphabetHolder<I>> CompactDFA<I> determinize(A nfa)
-
determinize
public static <I,A extends NFA<?,I> & InputAlphabetHolder<I>> CompactDFA<I> determinize(A nfa, boolean partial, boolean minimize)
-
determinize
public static <I> void determinize(NFA<?,I> nfa, Collection<? extends I> inputs, MutableDFA<?,I> out)
-
-