S
- state class.L
- transition label class.public final class Minimizer<S,L> extends Object
UniversalGraph
interface, and may be partially
defined. Note that undefined transitions are preserved, thus, they have no semantics that could be modeled otherwise
wrt. this algorithm.
The implemented algorithm is described in the paper "Minimizing incomplete automata" by Marie-Pierre Beal and Maxime Crochemore.
Modifier and Type | Method and Description |
---|---|
static <S,L> Minimizer<S,L> |
getLocalInstance()
Retrieves the local instance of this minimizer.
|
static <S,L> MinimizationResult<S,L> |
minimize(UniversalGraph<S,?,?,L> graph)
Minimizes an automaton.
|
static <S,L> MinimizationResult<S,L> |
minimize(UniversalGraph<S,?,?,L> graph,
Collection<? extends S> start) |
MinimizationResult<S,L> |
performMinimization(UniversalGraph<S,?,?,L> graph) |
<E> MinimizationResult<S,L> |
performMinimization(UniversalGraph<S,E,?,L> graph,
Collection<? extends S> initialNodes)
Performs the minimization of an automaton.
|
public static <S,L> MinimizationResult<S,L> minimize(UniversalGraph<S,?,?,L> graph)
MinimizationResult
structure
is returned. The automaton is interfaced using an adapter implementing the UniversalGraph
interface.S
- state class.L
- transition label class.graph
- the automaton interface.public static <S,L> MinimizationResult<S,L> minimize(UniversalGraph<S,?,?,L> graph, Collection<? extends S> start)
public static <S,L> Minimizer<S,L> getLocalInstance()
The minimizer acts like a singleton of which each thread possesses their own. The minimizer instance returned by this method is the one belonging to the calling thread. Therefore, it is not safe to share such an instance between two threads.
S
- state class.L
- transition label class.public <E> MinimizationResult<S,L> performMinimization(UniversalGraph<S,E,?,L> graph, Collection<? extends S> initialNodes)
The automaton is accessed via a UniversalGraph
. The result of the minimization process is effectively a
partition on the set of states, each element (block) in this partition contains equivalent states that can be
merged in a minimized automaton.
E
- edge identifier class.graph
- the automaton interface.MinimizationResult
structure, containing the state partition.public MinimizationResult<S,L> performMinimization(UniversalGraph<S,?,?,L> graph)
Copyright © 2020. All rights reserved.