public abstract class DFAs extends Object
DFA
s.
Note that the methods provided by this class do not modify their input arguments. Such methods
are instead provided by the MutableDFAs
class.
Modifier and Type | Method and Description |
---|---|
static <I> CompactDFA<I> |
and(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Alphabet<I> inputAlphabet)
Calculates the conjunction ("and") of two DFA, and returns the result as a new DFA.
|
static <I,S,A extends MutableDFA<S,I>> |
and(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Collection<? extends I> inputs,
A out)
Calculates the conjunction ("and") of two DFA, and stores the result in a given mutable DFA.
|
static <I> CompactDFA<I> |
combine(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Alphabet<I> inputAlphabet,
AcceptanceCombiner combiner)
Most general way of combining two DFAs.
|
static <I,S,A extends MutableDFA<S,I>> |
combine(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Collection<? extends I> inputs,
A out,
AcceptanceCombiner combiner)
Most general way of combining two DFAs.
|
static <I> CompactDFA<I> |
complement(DFA<?,I> dfa,
Alphabet<I> inputAlphabet)
Calculates the complement (negation) of a DFA, and returns the result as a new DFA.
|
static <I,S,A extends MutableDFA<S,I>> |
complement(DFA<?,I> dfa,
Collection<? extends I> inputs,
A out)
Calculates the complement (negation) of a DFA, and stores the result in a given mutable DFA.
|
static <I> CompactDFA<I> |
complete(DFA<?,I> dfa,
Alphabet<I> inputs) |
static <I,S,A extends MutableDFA<S,I>> |
complete(DFA<?,I> dfa,
Collection<? extends I> inputs,
A out) |
static <I> CompactDFA<I> |
equiv(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Alphabet<I> inputAlphabet)
Calculates the equivalence ("<=>") of two DFA, and returns the result as a new DFA.
|
static <I,S,A extends MutableDFA<S,I>> |
equiv(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Collection<? extends I> inputs,
A out)
Calculates the equivalence ("<=>") of two DFA, and stores the result in a given mutable DFA.
|
static <I> CompactDFA<I> |
impl(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Alphabet<I> inputAlphabet)
Calculates the implication ("=>") of two DFA, and returns the result as a new DFA.
|
static <I,S,A extends MutableDFA<S,I>> |
impl(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Collection<? extends I> inputs,
A out)
Calculates the implication ("=>") of two DFA, and stores the result in a given mutable DFA.
|
static <I> CompactDFA<I> |
or(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Alphabet<I> inputAlphabet)
Calculates the disjunction ("or") of two DFA, and returns the result as a new DFA.
|
static <I,S,A extends MutableDFA<S,I>> |
or(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Collection<? extends I> inputs,
A out)
Calculates the disjunction ("or") of two DFA, and stores the result in a given mutable DFA.
|
static <I> CompactDFA<I> |
xor(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Alphabet<I> inputAlphabet)
Calculates the exclusive-or ("xor") of two DFA, and returns the result as a new DFA.
|
static <I,S,A extends MutableDFA<S,I>> |
xor(DFA<?,I> dfa1,
DFA<?,I> dfa2,
Collection<? extends I> inputs,
A out)
Calculates the exclusive-or ("xor") of two DFA, and stores the result in a given mutable DFA.
|
public static <I,S,A extends MutableDFA<S,I>> A combine(DFA<?,I> dfa1, DFA<?,I> dfa2, Collection<? extends I> inputs, A out, AcceptanceCombiner combiner)
AcceptanceCombiner
specified via the combiner
parameter
specifies how acceptance values of the DFAs will be combined to an acceptance value in the result DFA.dfa1
- the first DFAdfa2
- the second DFAinputs
- the input symbols to considerout
- the mutable DFA for storing the resultcombiner
- combination method for acceptance valuesout
, for conveniencepublic static <I> CompactDFA<I> combine(DFA<?,I> dfa1, DFA<?,I> dfa2, Alphabet<I> inputAlphabet, AcceptanceCombiner combiner)
combine(DFA, DFA, Collection, MutableDFA, AcceptanceCombiner)
, but the result automaton
is automatically created as a CompactDFA
.dfa1
- the first DFAdfa2
- the second DFAinputAlphabet
- the input alphabetcombiner
- combination method for acceptance valuespublic static <I,S,A extends MutableDFA<S,I>> A and(DFA<?,I> dfa1, DFA<?,I> dfa2, Collection<? extends I> inputs, A out)
dfa1
- the first DFAdfa2
- the second DFAinputs
- the input symbols to considerout
- a mutable DFA for storing the resultout
, for conveniencepublic static <I> CompactDFA<I> and(DFA<?,I> dfa1, DFA<?,I> dfa2, Alphabet<I> inputAlphabet)
dfa1
- the first DFAdfa2
- the second DFAinputAlphabet
- the input alphabetpublic static <I,S,A extends MutableDFA<S,I>> A or(DFA<?,I> dfa1, DFA<?,I> dfa2, Collection<? extends I> inputs, A out)
dfa1
- the first DFAdfa2
- the second DFAinputs
- the input symbols to considerout
- a mutable DFA for storing the resultout
, for conveniencepublic static <I> CompactDFA<I> or(DFA<?,I> dfa1, DFA<?,I> dfa2, Alphabet<I> inputAlphabet)
dfa1
- the first DFAdfa2
- the second DFAinputAlphabet
- the input alphabetpublic static <I,S,A extends MutableDFA<S,I>> A xor(DFA<?,I> dfa1, DFA<?,I> dfa2, Collection<? extends I> inputs, A out)
dfa1
- the first DFAdfa2
- the second DFAinputs
- the input symbols to considerout
- a mutable DFA for storing the resultout
, for conveniencepublic static <I> CompactDFA<I> xor(DFA<?,I> dfa1, DFA<?,I> dfa2, Alphabet<I> inputAlphabet)
dfa1
- the first DFAdfa2
- the second DFAinputAlphabet
- the input alphabetpublic static <I,S,A extends MutableDFA<S,I>> A equiv(DFA<?,I> dfa1, DFA<?,I> dfa2, Collection<? extends I> inputs, A out)
dfa1
- the first DFAdfa2
- the second DFAinputs
- the input symbols to considerout
- a mutable DFA for storing the resultout
, for conveniencepublic static <I> CompactDFA<I> equiv(DFA<?,I> dfa1, DFA<?,I> dfa2, Alphabet<I> inputAlphabet)
dfa1
- the first DFAdfa2
- the second DFAinputAlphabet
- the input alphabetpublic static <I,S,A extends MutableDFA<S,I>> A impl(DFA<?,I> dfa1, DFA<?,I> dfa2, Collection<? extends I> inputs, A out)
dfa1
- the first DFAdfa2
- the second DFAinputs
- the input symbols to considerout
- a mutable DFA for storing the resultout
, for conveniencepublic static <I> CompactDFA<I> impl(DFA<?,I> dfa1, DFA<?,I> dfa2, Alphabet<I> inputAlphabet)
dfa1
- the first DFAdfa2
- the second DFAinputAlphabet
- the input alphabetpublic static <I,S,A extends MutableDFA<S,I>> A complement(DFA<?,I> dfa, Collection<? extends I> inputs, A out)
Note that unlike MutableFSA.flipAcceptance()
, undefined transitions are treated as
leading to a rejecting sink state (and are thus turned into an accepting sink).
dfa
- the DFA to complementinputs
- the input symbols to considerout
- a mutable DFA for storing the resultout
, for conveniencepublic static <I> CompactDFA<I> complement(DFA<?,I> dfa, Alphabet<I> inputAlphabet)
Note that unlike MutableFSA.flipAcceptance()
, undefined transitions are treated as
leading to a rejecting sink state (and are thus turned into an accepting sink).
dfa
- the DFA to complementinputAlphabet
- the input alphabetpublic static <I,S,A extends MutableDFA<S,I>> A complete(DFA<?,I> dfa, Collection<? extends I> inputs, A out)
public static <I> CompactDFA<I> complete(DFA<?,I> dfa, Alphabet<I> inputs)
Copyright © 2015. All rights reserved.