Interface Expression

All Superinterfaces:
Serializable, TetradSerializable
All Known Implementing Classes:
ConstantExpression, EvaluationExpression, VariableExpression

public interface Expression extends TetradSerializable
Represents a mathematical expression. Used in the Calculator and the Generalized Sem model.

Note that expressions form trees. Each expression has a (possibly empty) list of children.

Author:
Tyler Gibson
  • Field Details

  • Method Details

    • evaluate

      double evaluate(Context context)
      Evaluates the expression using the given context
    • getToken

      String getToken()
      Returns:
      the token for this expression=="+".
    • getPosition

      Returns:
      the position, infix or not.
    • getExpressions

      List<Expression> getExpressions()
      Returns:
      the sub expressions of this expression.
    • getRealDistribution

      org.apache.commons.math3.distribution.RealDistribution getRealDistribution(Context context)
    • getIntegerDistribution

      org.apache.commons.math3.distribution.IntegerDistribution getIntegerDistribution(Context context)