java.lang.Object
net.automatalib.util.minimizer.MinimizationResult<S,L>
- Type Parameters:
S- state typeL- transition label type
The result structure of a minimization process. The result of a minimization process is a partition on the original
set of states. This is represented by a collection of
Blocks containing states that are equivalent and thus
can be merged.
Since all states in a block are equivalent (and thus especially have the same set of outgoing edge labels), a
minimized automaton can be created from this partition by instantiating a state for each block. The edges between
those states are created in the following way: For each state/block, an original state is chosen arbitrarily from
this block. The edges are created according to the edges of this state, only that they point to the states
representing the blocks the respective target states belong to (using getBlockForState(Object)).
The blocks in the result partition are guaranteed to have contiguous IDs (see Block.getId()), starting at 0.
This allows an efficient construction of the resulting automaton.
-
Method Summary
Modifier and TypeMethodDescriptiongetBlockForState(S origState) Retrieves the block to which a given original state belongs.Collection<Block<S,L>> Retrieves all blocks in the final partition.intRetrieves the number of blocks in the final partition.getRepresentative(Block<S, L> block) Chooses a representative (i.e., an arbitrary element of the set of states) from a block.static <S,L> Collection<S> getStatesInBlock(Block<S, L> block) Retrieves all (original) states in a block.
-
Method Details
-
getStatesInBlock
Retrieves all (original) states in a block.- Type Parameters:
S- state typeL- transition label type- Parameters:
block- the block.- Returns:
- a collection containing all original states in this block.
-
getNumBlocks
public int getNumBlocks()Retrieves the number of blocks in the final partition.- Returns:
- the number of blocks.
-
getBlocks
Retrieves all blocks in the final partition.- Returns:
- the final partition.
-
getRepresentative
Chooses a representative (i.e., an arbitrary element of the set of states) from a block.- Parameters:
block- the block.- Returns:
- an arbitrary element of the state set of the given block.
-
getBlockForState
Retrieves the block to which a given original state belongs.- Parameters:
origState- the original state.- Returns:
- the corresponding block.
-