Interface MarkingExpr

All Known Implementing Classes:
MarkingExpr.ConstantExpr, MarkingExpr.LelloExpr
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MarkingExpr
A function from Marking to Double.
  • Field Details

  • Method Details

    • from

      static MarkingExpr from(String expr, PetriNet pn)
      Creates a marking expression from a string.
      Parameters:
      expr - input expression string
      pn - PetriNet used to extract places
      Returns:
      an instance encoding the input expression
      Throws:
      IllegalArgumentException - if the variables are not places of the Petri net
    • of

      static MarkingExpr of(double value)
      Creates a constant marking expression.
      Parameters:
      value - constant value
      Returns:
      constant marking expression
    • evaluate

      double evaluate(Marking m)