File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Open diff view settings
Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ http://amelentev.github.io/eclipse.jdt-oo-site/
1010-----------------------Example Code---------------------------
1111
1212package symjava.examples;
13+
14+ import static symjava.symbolic.Symbol.* ;
15+ import symjava.bytecode.BytecodeFunc;
16+ import symjava.symbolic.* ;
17+
1318/**
1419 * This example uses Java Operator Overloading for symbolic computation.
1520 * See https://github.com/amelentev/java-oo for Java Operator Overloading.
@@ -18,9 +23,18 @@ package symjava.examples;
1823public class Example1 {
1924
2025 public static void main(String[] args) {
26+ Expr expr = x + y * z;
27+ System.out.println(expr);
2128
22-
29+ Expr expr2 = expr.subs(x, y*y);
30+ System.out.println(expr2);
31+ System.out.println(expr2.diff(y));
32+
33+ Func f = new Func("f1", expr2.diff(y));
34+ System.out.println(f);
35+
36+ BytecodeFunc func = f.toBytecodeFunc();
37+ System.out.println(func.apply(1,2));
2338 }
24-
2539}
2640
Original file line number Diff line number Diff line change 1+ # SymJava
2+ SymJava is a Java library for symbolic mathematics.
3+
4+ SymJava is developed under Java 7 and Eclipse-Kepler (SR2 4.3.2, https://www.eclipse.org/downloads/packages/release/kepler/sr2)
5+
6+ Install java-oo Eclipse plugin for Java Operator Overloading support (https://github.com/amelentev/java-oo):
7+ Click in menu: Help -> Install New Software. Enter in "Work with" field:
8+ http://amelentev.github.io/eclipse.jdt-oo-site/
9+
10+ -----------------------Example Code---------------------------
11+
12+ package symjava.examples;
13+ /**
14+ * This example uses Java Operator Overloading for symbolic computation.
15+ * See https://github.com/amelentev/java-oo for Java Operator Overloading.
16+ *
17+ */
18+ public class Example1 {
19+
20+ public static void main(String[] args) {
21+
22+
23+ }
24+
25+ }
26+
You can’t perform that action at this time.
0 commit comments