org.activemath.exercises.openmath.services
Class ArithmeticExpressionEvaluator
java.lang.Object
org.activemath.exercises.openmath.OpenMathService
org.activemath.exercises.openmath.services.ArithmeticExpressionEvaluator
public class ArithmeticExpressionEvaluator
- extends OpenMathService
Arithmetic expression evaluator OpenMath service.
Evaluates OpenMath expressions with arithmetic symbols in them, as
double-precision floating point numbers.
- Version:
- $Revision: 1.13 $ $Date: 2008/11/25 14:24:39 $
|
Method Summary |
org.jdom.Element |
evaluate(org.jdom.Element expressionOmobj,
Map variables)
Evaluate the expression, and return its value as the JDom tree of the
OpenMath XML with the result. |
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArithmeticExpressionEvaluator
public ArithmeticExpressionEvaluator()
main
public static void main(String[] args)
evaluate
public org.jdom.Element evaluate(org.jdom.Element expressionOmobj,
Map variables)
- Evaluate the expression, and return its value as the JDom tree of the
OpenMath XML with the result.
- Overrides:
evaluate in class OpenMathService
- Returns:
- OMOBJ element (with OM namespace) containing the value.