use of org.matheclipse.core.eval.MathMLUtilities in project symja_android_library by axkr.
the class MathMLForm method evaluate.
@Override
public IExpr evaluate(final IAST ast, EvalEngine engine) {
Validate.checkSize(ast, 2);
MathMLUtilities mathMLUtil = new MathMLUtilities(engine, false, engine.isRelaxedSyntax());
IExpr arg1 = ast.arg1();
StringWriter stw = new StringWriter();
mathMLUtil.toMathML(arg1, stw);
return F.$str(stw.toString());
}
use of org.matheclipse.core.eval.MathMLUtilities in project symja_android_library by axkr.
the class MathMLPresentationTestCase method setUp.
/**
* The JUnit setup method
*/
protected void setUp() {
try {
// F.initSymbols();
EvalEngine engine = new EvalEngine(false);
mathUtil = new MathMLUtilities(engine, false, true);
} catch (Exception e) {
e.printStackTrace();
}
// fParser = new Parser(null);
// ExpressionFactory factory = new ExpressionFactory(new Namespace());
// fParser.setFactory(factory);
// fMathMLFactory = new MathMLFormFactory(factory);
}
Aggregations