Package org.svvrl.goal.core.aut
Class ElementaryCycleFinder
java.lang.Object
org.svvrl.goal.core.AbstractAlgorithm
org.svvrl.goal.core.aut.ElementaryCycleFinder
- All Implemented Interfaces:
java.util.EventListener
,Algorithm
,AlgorithmListener
public class ElementaryCycleFinder extends AbstractAlgorithm
This class provides methods to find all the elementary cycles in an automaton
based on
ElementaryCycleGenerator
.- Author:
- "Ming-Hsien Tsai"
-
Constructor Summary
Constructors Constructor Description ElementaryCycleFinder()
-
Method Summary
Modifier and Type Method Description java.util.List<StateList>
getElementaryCycles(Automaton aut)
Returns all elementary cycles in a specified automaton.java.util.List<StateList>
getElementaryCyclesIn(Automaton aut, StateSet area)
Returns elementary cycles in a specified area in an automaton.java.util.List<StateList>
getElementaryCyclesInWith(Automaton aut, StateSet area, StateSet must)
Returns elementary cycles in a specified area in an automaton.java.util.List<StateList>
getElementaryCyclesWith(Automaton aut, StateSet must)
Returns elementary cycles in a specified automaton.StateList
getFirstElementaryCycleIn(Automaton aut, StateSet area)
Returns the first elementary cycle in a specified area in an automaton.StateList
getFirstElementaryCycleIn(Automaton aut, StateSet area, FilterRule<StateList> rule)
Returns the first elementary cycle in a specified area in an automaton that satisfies a specified filter rule.StateList
getFirstElementaryCycleInWith(Automaton aut, StateSet area, StateSet must)
Returns the first elementary cycle in a specified area in an automaton.StateList
getFirstElementaryCycleInWith(Automaton aut, StateSet area, StateSet must, FilterRule<StateList> rule)
Returns the first elementary cycle in a specified area in an automaton that satisfies a specified filter rule.StateList
getFirstElementaryCycleWith(Automaton aut, StateSet must)
Returns the first elementary cycle in an automaton.StateList
getFirstElementaryCycleWith(Automaton aut, StateSet must, FilterRule<StateList> rule)
Returns the first elementary cycle in an automaton that satisfies a specified filter rule.boolean
hasElementaryCyclesIn(Automaton aut, StateSet area)
Returnstrue
if there is some elementary cycle in a specified area in an automaton.boolean
hasElementaryCyclesInWith(Automaton aut, StateSet area, StateSet must)
Returnstrue
if there is some elementary cycle in a specified area in an automaton.boolean
hasElementaryCyclesWith(Automaton aut, StateSet must)
Returnstrue
if there is some elementary cycle in an automaton.Methods inherited from class org.svvrl.goal.core.AbstractAlgorithm
addAlgorithmListener, addProgress, addSubAlgorithm, appendStageMessage, appendStepMessage, getAlgorithmListeners, getCurrentProgress, getMaximalProgress, getMinimalProgress, getName, getOptions, getSubAlgorithms, isDeterministicProgress, removeAlgorithmListener, removeSubAlgorithm, setCurrentProgress, setDeterministicProgress, setMaximalProgress, setMinimalProgress
-
Constructor Details
-
ElementaryCycleFinder
public ElementaryCycleFinder()
-
-
Method Details
-
getElementaryCycles
Returns all elementary cycles in a specified automaton.- Parameters:
aut
- an automaton- Returns:
- all elementary cycles in the specified automaton
-
getElementaryCyclesWith
Returns elementary cycles in a specified automaton. Any returned elementary cycle must contain at least one state in a specified set of states.- Parameters:
aut
- an automatonmust
- a set of states- Returns:
- elementary cycles in the specified automaton
-
getElementaryCyclesIn
Returns elementary cycles in a specified area in an automaton. Each returned elementary cycle should never contain states that are out of the area.- Parameters:
aut
- an automatonarea
- a set of states specifying an area in the automaton- Returns:
- elementary cycles in the specified automaton
-
getElementaryCyclesInWith
public java.util.List<StateList> getElementaryCyclesInWith(Automaton aut, StateSet area, StateSet must)Returns elementary cycles in a specified area in an automaton. Each returned elementary cycle should never contain states that are out of the area. Any returned elementary cycle must contain at least one state in the setmust
of states.- Parameters:
aut
- an automatonarea
- a set of states specifying an area in the automatonmust
- a set of states- Returns:
- elementary cycles in the specified automaton
-
getFirstElementaryCycleIn
Returns the first elementary cycle in a specified area in an automaton. The elementary cycle should never contain states that are out of the area.- Parameters:
aut
- an automatonarea
- a set of states specifying an area in the automaton- Returns:
- the first satisfactory elementary cycle, or
null
if there is no satisfactory cycle
-
getFirstElementaryCycleWith
Returns the first elementary cycle in an automaton. The elementary cycle must contain at least one state in the setmust
of states.- Parameters:
aut
- an automatonmust
- a set of states- Returns:
- the first satisfactory elementary cycle, or
null
if there is no satisfactory cycle
-
getFirstElementaryCycleInWith
Returns the first elementary cycle in a specified area in an automaton. The elementary cycle should never contain states that are out of the area but must contain at least one state in the setmust
of states.- Parameters:
aut
- an automatonarea
- a set of states specifying an area in the automatonmust
- a set of states- Returns:
- the first satisfactory elementary cycle in the specified
automaton, or
null
if there is no satisfactory cycle
-
getFirstElementaryCycleIn
public StateList getFirstElementaryCycleIn(Automaton aut, StateSet area, FilterRule<StateList> rule)Returns the first elementary cycle in a specified area in an automaton that satisfies a specified filter rule. The elementary cycle should never contain states that are out of the area.- Parameters:
aut
- an automatonarea
- a set of states specifying an area in the automatonrule
- a filter rule- Returns:
- the first satisfactory elementary cycle, or
null
if there is no satisfactory cycle
-
getFirstElementaryCycleWith
public StateList getFirstElementaryCycleWith(Automaton aut, StateSet must, FilterRule<StateList> rule)Returns the first elementary cycle in an automaton that satisfies a specified filter rule. The elementary cycle must contain at least one state in the setmust
of states.- Parameters:
aut
- an automatonmust
- a set of statesrule
- a filter rule- Returns:
- the first satisfactory elementary cycle, or
null
if there is no satisfactory cycle
-
getFirstElementaryCycleInWith
public StateList getFirstElementaryCycleInWith(Automaton aut, StateSet area, StateSet must, FilterRule<StateList> rule)Returns the first elementary cycle in a specified area in an automaton that satisfies a specified filter rule. The elementary cycle should never contain states that are out of the area but must contain at least one state in the setmust
of states.- Parameters:
aut
- an automatonarea
- a set of states specifying an area in the automatonmust
- a set of statesrule
- a filter rule- Returns:
- the first satisfactory elementary cycle in the specified
automaton, or
null
if there is no satisfactory cycle
-
hasElementaryCyclesIn
Returnstrue
if there is some elementary cycle in a specified area in an automaton. The elementary cycle should never contain states that are out of the area.- Parameters:
aut
- an automatonarea
- a set of states specifying an area in the automaton- Returns:
true
if a satisfactory cycle was found
-
hasElementaryCyclesWith
Returnstrue
if there is some elementary cycle in an automaton. The elementary cycle must contain at least one state in the setmust
of states.- Parameters:
aut
- an automatonmust
- a set of states- Returns:
true
if a satisfactory cycle was found
-
hasElementaryCyclesInWith
Returnstrue
if there is some elementary cycle in a specified area in an automaton. The elementary cycle should never contain states that are out of the area but must contain at least one state in the setmust
of states.- Parameters:
aut
- an automatonarea
- a set of states specifying an area in the automatonmust
- a set of states- Returns:
true
if a satisfactory cycle was found
-