Class Marking
java.lang.Object
org.tweetyproject.logics.petri.syntax.reachability_graph.Marking
- All Implemented Interfaces:
Comparable<Marking>
,Node
A class to describe markings (i.e. a token distribution over all places) of a Petri net
- Author:
- Benedikt Knopp
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
check if this marking deeply equals that markinggetId()
Return the idReturn getPlacesint
Return the tokens at the place at this markingint
getTokensByPlace
(Place place) Retrieve the number of tokens at the specified place at this markingboolean
Return hasPlacevoid
Specify the number of tokens at the place at this markingvoid
Setter id
-
Constructor Details
-
Marking
public Marking()Create a new instance -
Marking
-
-
Method Details
-
getId
-
setId
-
getTokens
Return the tokens at the place at this marking- Parameters:
place
- the place of interest- Returns:
- the tokens at the place at this marking
-
putTokens
Specify the number of tokens at the place at this marking- Parameters:
place
- the id of the placetoken
- the token
-
hasPlace
-
getPlaces
-
equals
check if this marking deeply equals that marking- Parameters:
marking
- that marking to compare this marking to- Returns:
- true iff both markings describe the same set of places and the number of tokens are equal at each place
-
getTokensByPlace
Retrieve the number of tokens at the specified place at this marking- Parameters:
place
- the place- Returns:
- the number of tokens at the place
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Marking>
-