Class StochasticLabelledDataPetriNetSemanticsImpl
- java.lang.Object
-
- org.processmining.stochasticlabelleddatapetrinet.StochasticLabelledDataPetriNetSemanticsImpl
-
- All Implemented Interfaces:
java.lang.Cloneable,StochasticLabelledDataPetriNetSemantics
- Direct Known Subclasses:
StochasticLabelledDataPetrinetSemanticsDataUnaware,StochasticLabelledDataPetriNetSemanticsWeightsImpl
public abstract class StochasticLabelledDataPetriNetSemanticsImpl extends java.lang.Object implements StochasticLabelledDataPetriNetSemantics
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.BitSetenabledTransitionsprotected intnumberOfEnabledTransitions
-
Constructor Summary
Constructors Constructor Description StochasticLabelledDataPetriNetSemanticsImpl(StochasticLabelledDataPetriNet net, DataStateFactory dataStateFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StochasticLabelledDataPetriNetSemanticsImplclone()UtilitiesvoidexecuteTransition(int transition, DataState dataEffect)Update the state to reflect execution of the transition.DataStategetDataState()java.util.BitSetgetEnabledTransitions()intgetNumberOfVariables()byte[]getState()java.lang.StringgetTransitionLabel(int transition)java.lang.StringgetVariableLabel(int variable)StochasticLabelledDataPetriNet.VariableTypegetVariableType(int variable)booleanisFinalState()booleanisStrictWriteSemantics()booleanisTransitionSilent(int transition)DataStatenewDataState()voidsetDataState(DataState dataState)Set the data state to a copy of the supplied statevoidsetInitialState(DataState initialDataState)(Re)set the semantics to the initial statevoidsetState(byte[] newState)Set a copy of the given state.voidsetStrictWriteSemantics(boolean isStrictWriteSemantics)-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.processmining.stochasticlabelleddatapetrinet.StochasticLabelledDataPetriNetSemantics
getTotalWeightOfEnabledTransitions, getTransitionWeight
-
-
-
-
Constructor Detail
-
StochasticLabelledDataPetriNetSemanticsImpl
public StochasticLabelledDataPetriNetSemanticsImpl(StochasticLabelledDataPetriNet net, DataStateFactory dataStateFactory)
-
-
Method Detail
-
setInitialState
public void setInitialState(DataState initialDataState)
Description copied from interface:StochasticLabelledDataPetriNetSemantics(Re)set the semantics to the initial state- Specified by:
setInitialStatein interfaceStochasticLabelledDataPetriNetSemantics
-
executeTransition
public void executeTransition(int transition, DataState dataEffect)Description copied from interface:StochasticLabelledDataPetriNetSemanticsUpdate the state to reflect execution of the transition.- Specified by:
executeTransitionin interfaceStochasticLabelledDataPetriNetSemantics- Parameters:
transition- index fireddataEffect- containing values for all (and only those) written variables
-
getEnabledTransitions
public java.util.BitSet getEnabledTransitions()
- Specified by:
getEnabledTransitionsin interfaceStochasticLabelledDataPetriNetSemantics- Returns:
- an array of indices of the transitions that are enabled. May be changed and stored by the caller.
-
isFinalState
public boolean isFinalState()
- Specified by:
isFinalStatein interfaceStochasticLabelledDataPetriNetSemantics- Returns:
- whether the current state is a final state.
-
getState
public byte[] getState()
- Specified by:
getStatein interfaceStochasticLabelledDataPetriNetSemantics- Returns:
- a copy of the current state.
-
setState
public void setState(byte[] newState)
Description copied from interface:StochasticLabelledDataPetriNetSemanticsSet a copy of the given state.- Specified by:
setStatein interfaceStochasticLabelledDataPetriNetSemantics
-
getDataState
public DataState getDataState()
- Specified by:
getDataStatein interfaceStochasticLabelledDataPetriNetSemantics- Returns:
- a copy of the current data state
-
setDataState
public void setDataState(DataState dataState)
Description copied from interface:StochasticLabelledDataPetriNetSemanticsSet the data state to a copy of the supplied state- Specified by:
setDataStatein interfaceStochasticLabelledDataPetriNetSemantics
-
newDataState
public DataState newDataState()
- Specified by:
newDataStatein interfaceStochasticLabelledDataPetriNetSemantics
-
isTransitionSilent
public boolean isTransitionSilent(int transition)
- Specified by:
isTransitionSilentin interfaceStochasticLabelledDataPetriNetSemantics- Parameters:
transition- index- Returns:
- whether the transition is observable (false) or silent (true)
-
getTransitionLabel
public java.lang.String getTransitionLabel(int transition)
- Specified by:
getTransitionLabelin interfaceStochasticLabelledDataPetriNetSemantics
-
getNumberOfVariables
public int getNumberOfVariables()
- Specified by:
getNumberOfVariablesin interfaceStochasticLabelledDataPetriNetSemantics
-
getVariableLabel
public java.lang.String getVariableLabel(int variable)
- Specified by:
getVariableLabelin interfaceStochasticLabelledDataPetriNetSemantics
-
getVariableType
public StochasticLabelledDataPetriNet.VariableType getVariableType(int variable)
- Specified by:
getVariableTypein interfaceStochasticLabelledDataPetriNetSemantics
-
clone
public StochasticLabelledDataPetriNetSemanticsImpl clone()
Description copied from interface:StochasticLabelledDataPetriNetSemanticsUtilities- Specified by:
clonein interfaceStochasticLabelledDataPetriNetSemantics- Overrides:
clonein classjava.lang.Object
-
isStrictWriteSemantics
public boolean isStrictWriteSemantics()
-
setStrictWriteSemantics
public void setStrictWriteSemantics(boolean isStrictWriteSemantics)
-
-