public class ExplicitTransitionSystem extends NamedObject implements TransitionSystem
Constructor and Description |
---|
ExplicitTransitionSystem(ExplicitTransitionSystem orig)
Creates a new ExplicitTransitionSystem which is a copy of another one.
|
ExplicitTransitionSystem(Graph initial)
Creates a new ExplicitTransitionSystem with a given initial graph and
no transitions.
|
Modifier and Type | Method and Description |
---|---|
Transition |
addTransition(Morphism morph)
Adds a transition to this ExplicitTransitionSystem by giving the
new transition's correspondence morphism.
|
Transition |
addTransition(Transition transition)
Adds a transition to this ExplicitTransitionSystem.
|
void |
addTransitions(java.util.Collection<Transition> transitions)
Adds transitions to this transition system.
|
void |
addTransitions(Morphism first,
Morphism... more)
Adds transitions to this transition system.
|
void |
addTransitions(Transition first,
Transition... more)
Adds transitions to this transition system.
|
static ExplicitTransitionSystem |
create(Graph initial,
java.util.Collection<Transition> transitions)
Creates a new ExplicitTransitionSystem.
|
static ExplicitTransitionSystem |
create(Graph initial,
Morphism... transitions)
Creates a new ExplicitTransitionSystem.
|
static ExplicitTransitionSystem |
createWithMorphisms(Graph initial,
java.util.Collection<Morphism> morphisms)
Creates a new ExplicitTransitionSystem by giving a collection of
transition morphisms.
|
IsomorphismMap<java.lang.Integer> |
getDepths()
Returns a map which assigns a depth to each graph in this
ExplicitTransitionSystem.
|
java.util.Set<Graph> |
getGraphs()
Returns the set of graphs which occur in this transition system.
|
Graph |
getInitialGraph()
Returns the initial graph of this graph transition system.
|
java.util.Set<Label> |
getSignature()
Returns the signature of this transition system.
|
java.util.Set<Transition> |
getTransitions()
Returns a set of all transitions in this ExplicitTransitionSystem.
|
java.util.Set<Transition> |
getTransitions(Graph source)
Returns the outgoing transitions from a source graph.
|
void |
nameAllGraphs()
Makes sure that all graphs which occur in this ExplicitTransitionSystem
have a name.
|
void |
setInitialGraph(Graph initial)
Sets the initial graph.
|
getName, hasName, setName
getAttribute, setAttribute
public ExplicitTransitionSystem(Graph initial)
ExplicitTransitionSystems can also be constructed with the create...(...) static factory methods.
initial
- the initial graph of the new ExplicitTransitionSystempublic ExplicitTransitionSystem(ExplicitTransitionSystem orig)
This constructor constructs a shallow copy of an ExplicitTransitionSystem. That is, it contains the same objects as graphs and transitions as the original.
orig
- the ExplicitTransitionSystem of which the newly constructed one is
a copypublic Graph getInitialGraph()
null
.getInitialGraph
in interface TransitionSystem
public void setInitialGraph(Graph initial)
initial
- the new initial graph of this ExplicitTransitionSystempublic Transition addTransition(Transition transition)
The transition which is added to the transition system is returned;
that is the returned morphism is either the argument transition
,
or a transition which is isomorphic to transition
.
transition
- transition which is to be added to the transition systemjava.lang.NullPointerException
- if transition == null
public Transition addTransition(Morphism morph)
The transition which is added to the transition system is returned;
that is the returned morphism is either the argument transition
,
or a transition which is isomorphic to transition
.
morph
- morphism of a transition which is to be added to the transition
systemjava.lang.NullPointerException
- if transition == null
public void addTransitions(Transition first, Transition... more)
addTransition
on all arguments.first
- first transition to be added to this transition systemmore
- the rest of the transitions to be add to this transition systemjava.lang.NullPointerException
- if one of the arguments is null
public void addTransitions(Morphism first, Morphism... more)
addTransition
on all arguments.first
- morphism of the first transition to be added to this transition
systemmore
- morphisms of the rest of the transitions to be add to this
transition systemjava.lang.NullPointerException
- if one of the arguments is null
public void addTransitions(java.util.Collection<Transition> transitions)
addTransition
on all morphism in the given collection.transitions
- collection of transitions which are to be added to this transition
systempublic java.util.Set<Transition> getTransitions(Graph source)
The Set returned by this method can be modified by the caller, but changes made to the set are not reflected by this transition system.
getTransitions
in interface TransitionSystem
source
- the source graph of the returned transitionspublic java.util.Set<Transition> getTransitions()
The returned set can be changed by the caller, but changes made to the sets are not reflected in this transition system.
public java.util.Set<Graph> getGraphs()
The returned Set object can be modified by the caller, but the changes are not reflected in this ExplicitTransitionSystem.
public IsomorphismMap<java.lang.Integer> getDepths()
The returned map is newly created and may be modified by the caller.
java.lang.IllegalStateException
- if this ExplicitTransitionSystem does not have an initial graphpublic java.util.Set<Label> getSignature()
public void nameAllGraphs()
public static ExplicitTransitionSystem create(Graph initial, Morphism... transitions)
initial
- initial graph of the new ExplicitTransitionSystemtransitions
- transitions of the new ExplicitTransitionSystempublic static ExplicitTransitionSystem create(Graph initial, java.util.Collection<Transition> transitions)
initial
- initial graph of the new ExplicitTransitionSystemtransitions
- transitions of the new ExplicitTransitionSystempublic static ExplicitTransitionSystem createWithMorphisms(Graph initial, java.util.Collection<Morphism> morphisms)
initial
- initial graph of the new ExplicitTransitionSystemtransitions
- transitions of the new ExplicitTransitionSystem