Expr expr = x + y * z;
System.out.println(expr); //x + y*z
Expr expr2 = expr.subs(x, y*y);
System.out.println(expr2); //y^2 + y*z
System.out.println(expr2.diff(y)); //2*y + z
Func f = new Func("f1", expr2.diff(y));
System.out.println(f); //f1(y,z)
BytecodeFunc func = f.toBytecodeFunc(); //Similar to the lambdify in sympy
System.out.println(func.apply(1,2)); //4.0
There are two important features:
1. Operator Overloading is implemented by using https://github.com/amelentev/java-oo
2. Lambdify in sympy is implemented in SymJava by using BCEL library
Let me know if any one interested in this? Just send me an email: nkliuyuemingATgmail.com
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/8262f07b-a540-4b71-8e19-303da5141ead%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAP7f1Ag1Gst2ggyVMG7iON_60B49MoDMXY6gu0McCp%3D_3PnGkw%40mail.gmail.com.