public class NDFAOperations
extends java.lang.Object
Constructor and Description |
---|
NDFAOperations(java.lang.Class<? extends AutomatonFactory> factoryClass) |
Modifier and Type | Method and Description |
---|---|
protected void |
copyState(AutomatonFactory factory,
java.util.Map<State,java.lang.Object> stateMap,
State s,
int id) |
protected java.util.Map<State,java.lang.Object> |
copyStates(Automaton a,
AutomatonFactory factory) |
protected void |
copyTransition(AutomatonFactory factory,
java.util.Map<State,java.lang.Object> stateMap,
Transition t) |
protected void |
copyTransitions(Automaton a,
AutomatonFactory factory,
java.util.Map<State,java.lang.Object> stateMap) |
DeterministicAutomaton |
determinize(Automaton a)
Return a deterministic automaton accepting the same language as a.
|
static NDFAOperations |
getInstance() |
protected java.util.Set<java.lang.String> |
getLabels(java.lang.Iterable<State> states) |
protected java.util.Set<java.lang.String> |
getLabels(State... states) |
protected int |
getMaxId(Automaton a) |
Automaton |
intersect(Automaton a1,
Automaton a2)
Return an automaton accepting the intersection of the languages of a1 and a2.
|
boolean |
isAll(Automaton a)
Returns if this automaton definitely accepts all strings (i.e., if it return true, the
automaton accepts all strings, if it returns false, it most likely doesn't).
|
boolean |
isEmpty(Automaton a)
Returns if this automaton definitely accepts the empty language (i.e., if it return true, the
automaton accepts the ampty language, if it returns false, it most likely doesn't).
|
Automaton |
negate(Automaton a)
Return an automaton accepting the complement of the language accepted by a.
|
protected AutomatonFactory |
newFactory() |
Automaton |
reduce(Automaton a) |
Automaton |
union(Automaton a1,
Automaton a2)
Return an automaton accepting the union of the languages of a1 and a2.
|
public NDFAOperations(java.lang.Class<? extends AutomatonFactory> factoryClass)
public static NDFAOperations getInstance()
public DeterministicAutomaton determinize(Automaton a)
a
- public Automaton intersect(Automaton a1, Automaton a2)
a1
- a2
- public boolean isAll(Automaton a)
a
- public boolean isEmpty(Automaton a)
a
- public Automaton negate(Automaton a)
a
- public Automaton union(Automaton a1, Automaton a2)
a1
- a2
- protected void copyState(AutomatonFactory factory, java.util.Map<State,java.lang.Object> stateMap, State s, int id)
protected java.util.Map<State,java.lang.Object> copyStates(Automaton a, AutomatonFactory factory)
protected void copyTransition(AutomatonFactory factory, java.util.Map<State,java.lang.Object> stateMap, Transition t)
protected void copyTransitions(Automaton a, AutomatonFactory factory, java.util.Map<State,java.lang.Object> stateMap)
protected java.util.Set<java.lang.String> getLabels(java.lang.Iterable<State> states)
protected java.util.Set<java.lang.String> getLabels(State... states)
protected int getMaxId(Automaton a)
protected AutomatonFactory newFactory()