Class EvaluationContext

java.lang.Object
com.knezevic.edaf.v3.repr.grammar.eval.EvaluationContext

public final class EvaluationContext extends Object
Variable bindings used for tree evaluation.
  • Constructor Details

    • EvaluationContext

      public EvaluationContext(Map<String,Double> realVariables, Map<String,Boolean> booleanVariables)
      Creates context from numeric and boolean variable maps.
  • Method Details

    • real

      public static EvaluationContext real(Map<String,Double> variables)
      Creates context from numeric variables only.
    • bool

      public static EvaluationContext bool(Map<String,Boolean> variables)
      Creates context from boolean variables only.
    • real

      public double real(String name)
      Resolves numeric variable (missing values default to zero).
    • bool

      public boolean bool(String name)
      Resolves boolean variable (missing values default to false).