Class MultiPebble<S>
- java.lang.Object
-
- owl.automaton.algorithm.simulations.MultiPebble<S>
-
- Type Parameters:
S
- The type of state of the underlying automaton.
public abstract class MultiPebble<S> extends Object
Abstracts multiple pebbles controlled by Duplicator in a multipebble simulation game.
-
-
Constructor Summary
Constructors Constructor Description MultiPebble()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
count()
Counts how many actual pebbles are contained.boolean
flag()
Computes the 'combined' flag of a multipebble.boolean
isSingleton()
S
onlyState()
Utility function that just grabs the only contained state.abstract List<Pebble<S>>
pebbles()
Set<MultiPebble<S>>
predecessors(Automaton<S,? extends BuchiAcceptance> aut, BitSet val)
MultiPebble<S>
setFlag(boolean b)
Sets the final flag of all contained subpebbles.abstract int
size()
Set<MultiPebble<S>>
successors(Automaton<S,? extends BuchiAcceptance> aut, BitSet val)
Computes the set of possible successor multipebbles for a given valuation and automaton.String
toString()
static <S> Set<MultiPebble<S>>
universe(Set<S> possibleValues, int k)
Builds all possible multi pebbles for the given input arguments.static <S> Set<MultiPebble<S>>
universe(Automaton<S,BuchiAcceptance> aut, int k)
-
-
-
Method Detail
-
universe
public static <S> Set<MultiPebble<S>> universe(Set<S> possibleValues, int k)
Builds all possible multi pebbles for the given input arguments.- Type Parameters:
S
- The type of state of the underlying automaton.- Parameters:
possibleValues
- The state space of the underlying automaton.k
- The maximum size of each multipebble.- Returns:
- The set of all possible k-pebbles for the given state space.
-
universe
public static <S> Set<MultiPebble<S>> universe(Automaton<S,BuchiAcceptance> aut, int k)
-
size
public abstract int size()
-
setFlag
public MultiPebble<S> setFlag(boolean b)
Sets the final flag of all contained subpebbles.- Parameters:
b
- The value to set all flags to.- Returns:
- A multipebble where all subpebbles have flag set to b.
-
flag
public boolean flag()
Computes the 'combined' flag of a multipebble.- Returns:
- true if all subpebbles have their flag set to true
-
successors
public Set<MultiPebble<S>> successors(Automaton<S,? extends BuchiAcceptance> aut, BitSet val)
Computes the set of possible successor multipebbles for a given valuation and automaton.- Parameters:
aut
- Automaton to use as basis.val
- One valuation along which the multipebble should be advanced by.- Returns:
- Successor multipebble for the given valuation.
-
predecessors
public Set<MultiPebble<S>> predecessors(Automaton<S,? extends BuchiAcceptance> aut, BitSet val)
-
count
public int count()
Counts how many actual pebbles are contained.- Returns:
- The actual number of pebbles contained, this is different from size(), which returns the maximum size of a multipebble and its successors
-
onlyState
public S onlyState()
Utility function that just grabs the only contained state.- Returns:
- The first state contained, useful for singleton multipebbles.
-
isSingleton
public boolean isSingleton()
-
-