Interface Expression
- All Superinterfaces:
- Serializable,- TetradSerializable
- All Known Implementing Classes:
- ConstantExpression,- EvaluationExpression,- VariableExpression
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.
- Version:
- $Id: $Id
- Author:
- Tyler Gibson
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final longConstantserialVersionUID=23L
- 
Method SummaryModifier and TypeMethodDescriptiondoubleEvaluates the expression using the given contextgetExpressions.org.apache.commons.math3.distribution.IntegerDistributiongetIntegerDistribution(Context context) getIntegerDistribution.getPosition.org.apache.commons.math3.distribution.RealDistributiongetRealDistribution(Context context) getRealDistribution.getToken()getToken.
- 
Field Details- 
serialVersionUIDstatic final long serialVersionUIDConstantserialVersionUID=23L- See Also:
 
 
- 
- 
Method Details- 
evaluateEvaluates the expression using the given context- Parameters:
- context- a- Contextobject
- Returns:
- a double
 
- 
getTokenString getToken()getToken. - Returns:
- the token for this expression=="+".
 
- 
getPositionExpressionDescriptor.Position getPosition()getPosition. - Returns:
- the position, infix or not.
 
- 
getExpressionsList<Expression> getExpressions()getExpressions. - Returns:
- the sub expressions of this expression.
 
- 
getRealDistributiongetRealDistribution. - Parameters:
- context- a- Contextobject
- Returns:
- a RealDistributionobject
 
- 
getIntegerDistributiongetIntegerDistribution. - Parameters:
- context- a- Contextobject
- Returns:
- a IntegerDistributionobject
 
 
-