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 Details

  • Method Details

    • getElementaryCycles

      public java.util.List<StateList> getElementaryCycles​(Automaton aut)
      Returns all elementary cycles in a specified automaton.
      Parameters:
      aut - an automaton
      Returns:
      all elementary cycles in the specified automaton
    • getElementaryCyclesWith

      public java.util.List<StateList> getElementaryCyclesWith​(Automaton aut, StateSet must)
      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 automaton
      must - a set of states
      Returns:
      elementary cycles in the specified automaton
    • getElementaryCyclesIn

      public java.util.List<StateList> getElementaryCyclesIn​(Automaton aut, StateSet area)
      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 automaton
      area - 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 set must of states.
      Parameters:
      aut - an automaton
      area - a set of states specifying an area in the automaton
      must - a set of states
      Returns:
      elementary cycles in the specified automaton
    • getFirstElementaryCycleIn

      public StateList getFirstElementaryCycleIn​(Automaton aut, StateSet area)
      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 automaton
      area - 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

      public StateList getFirstElementaryCycleWith​(Automaton aut, StateSet must)
      Returns the first elementary cycle in an automaton. The elementary cycle must contain at least one state in the set must of states.
      Parameters:
      aut - an automaton
      must - a set of states
      Returns:
      the first satisfactory elementary cycle, or null if there is no satisfactory cycle
    • getFirstElementaryCycleInWith

      public StateList getFirstElementaryCycleInWith​(Automaton aut, StateSet area, StateSet must)
      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 set must of states.
      Parameters:
      aut - an automaton
      area - a set of states specifying an area in the automaton
      must - 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 automaton
      area - a set of states specifying an area in the automaton
      rule - 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 set must of states.
      Parameters:
      aut - an automaton
      must - a set of states
      rule - 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 set must of states.
      Parameters:
      aut - an automaton
      area - a set of states specifying an area in the automaton
      must - a set of states
      rule - a filter rule
      Returns:
      the first satisfactory elementary cycle in the specified automaton, or null if there is no satisfactory cycle
    • hasElementaryCyclesIn

      public boolean hasElementaryCyclesIn​(Automaton aut, StateSet area)
      Returns true 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 automaton
      area - a set of states specifying an area in the automaton
      Returns:
      true if a satisfactory cycle was found
    • hasElementaryCyclesWith

      public boolean hasElementaryCyclesWith​(Automaton aut, StateSet must)
      Returns true if there is some elementary cycle in an automaton. The elementary cycle must contain at least one state in the set must of states.
      Parameters:
      aut - an automaton
      must - a set of states
      Returns:
      true if a satisfactory cycle was found
    • hasElementaryCyclesInWith

      public boolean hasElementaryCyclesInWith​(Automaton aut, StateSet area, StateSet must)
      Returns true 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 set must of states.
      Parameters:
      aut - an automaton
      area - a set of states specifying an area in the automaton
      must - a set of states
      Returns:
      true if a satisfactory cycle was found