AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Symja Library - Java Symbolic Math System for Android calculator
Note: this repository contains the Java 11 sources of the core modules. A minimal Android app example can be found in the symja-example repository:
Try the full-blown Android or iOS apps:
or help testing the latest Android BETA version or the web demo at matheclipse.org.
Read the Symja Manual :blue_book: for the description of the Symja language or browse the available functions :green_book: . We encourage everyone to participate in our Wiki.README 전문 보기 ↗Note: this repository contains the Java 11 sources of the core modules. A minimal Android app example can be found in the symja-example repository :
Try the full-blown Android or iOS apps:
or help testing the latest Android BETA version or the web demo at matheclipse.org.
Read the Symja Manual :blue_book: for the description of the Symja language or browse the available functions :green_book: . We encourage everyone to participate in our Wiki.
The different kinds of installations are described in the Wiki Installation.
Features of the Symja language:
Appengine web interface symjaweb.appspot.com - available as open source in this Github repository
Android App Calculator N+ on Google play store - available as open source in this Github repository provides an IDE mode to calculate arbitrary Symja expressions.
Eclipse EASE extension - use Symja as a REPL in Eclipse with this example Github repository which contains some Symja example scripts.
To get an idea of the kinds of expressions Symja handles, see the JUnit tests in this file.
Manipulate(Plot3D(Sin(a * x * y), {x, -1.5, 1.5}, {y, -1.5, 1.5}), {a,1,5})
Plot(Piecewise({{x^2, x < 0}, {x, x >= 0&&x<1},{Cos(x-1), x >= 1}}), {x, -2, 12})
package org.matheclipse.core.examples;
import org.matheclipse.core.eval.ExprEvaluator;
import org.matheclipse.core.expression.F;
import org.matheclipse.core.interfaces.IAST;
import org.matheclipse.core.interfaces.IExpr;
import org.matheclipse.core.interfaces.ISymbol;
import org.matheclipse.parser.client.SyntaxError;
import org.matheclipse.parser.client.math.MathException;
public class Example {
public static void main(String[] args) {
try {
ExprEvaluator util = new ExprEvaluator(false, (short) 100);
// Convert an expression to the internal Java form:
// Note: single character identifiers are case sensitive
// (the "D()" function identifier must be written as upper case
// character)
String javaForm = util.toJavaForm("D(sin(x)*cos(x),x)");
// prints: D(Times(Sin(x),Cos(x)),x)
System.out.println("Out[1]: " + javaForm.toString());
// Use the Java form to create an expression with F.* static
// methods:
ISymbol x = F.Dummy("x");
IAST function = F.D(F.Times(F.Sin(x), F.Cos(x)), x);
IExpr result = util.eval(function);
// print: Cos(x)^2-Sin(x)^2
System.out.println("Out[2]: " + result.toString());
// An IAST can be read as a java.util.List: index 0 is the head
// print: [D, Cos(x)*Sin(x), x]
System.out.println(function.asList());
// Note "diff" is an alias for the "D" function
result = util.eval("diff(sin(x)*cos(x),x)");
// print: Cos(x)^2-Sin(x)^2
System.out.println("Out[3]: " + result.toString());
// evaluate the last result (% or $ans contains "last answer")
result = util.eval("%+cos(x)^2");
// print: 2*Cos(x)^2-Sin(x)^2
System.out.println("Out[4]: " + result.toString());
// evaluate an Integrate[] expression
result = util.eval("integrate(sin(x)^5,x)");
// print: 2/3*Cos(x)^3-1/5*Cos(x)^5-Cos(x)
System.out.println("Out[5]: " + result.toString());
// set the value of a variable "a" to 10
// Note: in server mode the variable name must have a preceding '$'
// character
result = util.eval("a=10");
// print: 10
System.out.println("Out[6]: " + result.toString());
// do a calculation with variable "a"
result = util.eval("a*3+b");
// print: 30+b
System.out.println("Out[7]: " + result.toString());
// Do a calculation in "numeric mode" with the N() function
// Note: single character identifiers are case sensistive
// (the "N()" function identifier must be written as upper case
// character)
result = util.eval("N(sinh(5))");
// print: 74.20321057778875
System.out.println("Out[8]: " + result.toString());
// define a function with a recursive factorial function definition.
// Note: fac(0) is the stop condition.
result = util.eval("fac(x_Integer):=x*fac(x-1);fac(0)=1");
// now calculate factorial of 10:
result = util.eval("fac(10)");
// print: 3628800
System.out.println("Out[9]: " + result.toString());
function =
F.Function(F.Divide(F.Gamma(F.Plus(F.C1, F.Slot1)), F.Gamma(F.Plus(F.C1, F.Slot2))));
// eval function ( Gamma(1+#1)/Gamma(1+#2) ) & [23,20]
result = util.evalFunction(function, "23", "20");
// print: 10626
System.out.println("Out[10]: " + result.toString());
} catch (SyntaxError e) {
// catch Symja parser errors here
System.out.println(e.getMessage());
} catch (MathException me) {
// catch Symja math errors here
System.out.println(me.getMessage());
} catch (final Exception ex) {
System.out.println(ex.getMessage());
} catch (final StackOverflowError soe) {
System.out.println(soe.getMessage());
} catch (final OutOfMemoryError oome) {
System.out.println(oome.getMessage());
}
}
}
How to use Maven is described in the Maven wiki page.
First, you'll need a Java Development Kit (JDK) compatible with Java 11 or later.
The Integrated Development Environment (IDE) Eclipse is shipped with a suitable JDK, so you don't have to install a JDK by yourself. Install and open the latest version of the Eclipse development IDE for Java Developers:
a) Fork the Symja repository to use as a starting point.
b) Clone your new repository to your Eclipse workspace.
master branch on the next screen, and click "Next >".symja_android_library automatically, click "Finish".See this Git version control with Eclipse (EGit) - Tutorial for a general overview.
If you have any questions about using or developing for this project, send me an email!
If you would like to use parts of the system here are some Maven module licenses:
parser, external, core are published under LGPL license.gpl, api, io, astro are published under GPL license.Here are some of the associated JavaScript licenses:
The Maven modules below all build on matheclipse-core. A module inherits the dependencies of every module it depends on, so the licenses of matheclipse-core apply everywhere. matheclipse-core itself depends on matheclipse-parser and matheclipse-external; the third-party code vendored inside matheclipse-external is therefore listed together with core.
| Project | Purpose | License |
|---|---|---|
| Hipparchus | linear algebra, ODE solvers, optimization, statistics, FFT, geometry, clustering, curve fitting | Apache License 2.0 |
| apfloat | arbitrary precision arithmetic | MIT License |
| LogicNG | boolean logic, SAT solving | Apache License 2.0 |
| Choco-solver | constraint programming | BSD 3-Clause License |
| AdaptiveQuadrature | adaptive Gauss-Kronrod numerical integration | Apache License 2.0 |
| RoaringBitmap | compressed bitsets | Apache License 2.0 |
| MFL | MATLAB .mat file import and export | Apache License 2.0 |
| Paguro | persistent (immutable) collections | Apache License 2.0 or EPL 1.0 |
JAS Java Algebra System (vendored in matheclipse-external) | polynomial arithmetic, factorization, Groebner bases | LGPL; the Java bytecode is dual licensed under Apache 2.0 to allow usage in Android projects |
Diophantine (vendored in matheclipse-external) | solving Diophantine equations |
| Project | Purpose | License |
|---|---|---|
java-math-library (vendored as de.tilman_neumann.jml) | integer factorization, prime numbers, partitions, modular arithmetic, quadratic residues | GNU GPL v3 |
This module is the reason a distribution containing it has to be published under the GPL. No other module depends on it: FactorInteger and the other integer factorization functions use the factorization of matheclipse-core.
| Project | Purpose | License |
|---|---|---|
| JGraphT | graph data structures and graph algorithms | EPL 2.0 or LGPL 2.1 |
| Project | Purpose | License |
|---|---|---|
| BoofCV | image processing and computer vision | Apache License 2.0 |
| Hipparchus | numerics and statistics for image operations | Apache License 2.0 |
| JSVG | SVG rendering | MIT License |
| TwelveMonkeys ImageIO | additional raster image formats (JPEG, BMP, TIFF, WebP, PNM) | BSD 3-Clause License |
| Project | Purpose | License |
|---|---|---|
| Orekit | astronomy and space flight dynamics | Apache License 2.0 |
| Hipparchus | linear algebra and geometry | Apache License 2.0 |
Night Vision (ported as org.matheclipse.astro.meeus) | Meeus algorithms: planet and Moon positions, nutation, precession, delta T, planet magnitudes, star colours | GNU GPL v3 or later |
ASCC-2.5 (via Night Vision's star.db) | star catalogue to magnitude 11, about 1.06 million stars | cited, redistributed as in Night Vision |
| d3-celestial (data files) | stars to magnitude 8.5, constellations, deep-sky objects, Milky Way | BSD 3-Clause License |
| Natural Earth (data file) | land outlines for GeoGraphics | public domain |
The Night Vision port makes this module GPL. See matheclipse-astro/NOTICE.md.
| Project | Purpose | License |
|---|---|---|
| BioJava | bioinformatics, sequence alignment, amino acid properties | LGPL 2.1 |
| Project | Purpose | License |
|---|---|---|
| Chemistry Development Kit (CDK) | chemoinformatics, molecular formulas, SMILES/SMARTS, structure diagrams | LGPL 2.1 or later |
| Project | Purpose | License |
|---|---|---|
| ICU4J | Unicode, locale, transliteration and unit data | Unicode License v3 |
| Project | Purpose | License |
|---|---|---|
| Tablesaw (vendored fork) | dataframes and table operations | Apache License 2.0 |
| Apache Arrow | columnar in-memory data format | Apache License 2.0 |
| Apache POI | Excel import and export | Apache License 2.0 |
| fastutil | primitive type collections | Apache License 2.0 |
| RoaringBitmap | compressed bitsets | Apache License 2.0 |
| ICU4J | locale aware parsing and formatting | Unicode License v3 |
| jsoup | HTML table import | MIT License |
| Project | Purpose | License |
|---|---|---|
| Janino | runtime Java compiler | BSD 3-Clause License |
| JavaPoet | Java source code generation | Apache License 2.0 |
| Project | Purpose | License |
|---|---|---|
| apfloat | arbitrary precision arithmetic | MIT License |
| Project | Purpose | License |
|---|---|---|
| commonmark-java | Markdown parsing and HTML rendering | BSD 2-Clause License |
| Project | Purpose | License |
|---|---|---|
| Discord4J | Discord bot client | LGPL 3.0 |
This module aggregates image, nlp, astro, gpl, bio, chem, graphtheory, compile and dataset and therefore inherits all libraries listed above. In addition it bundles the JavaScript libraries listed in the License section, including KaTeX for math typesetting.
<a href = https://github.com/axkr/symja_android_library/graphs/contributors> <img src = https://contrib.rocks/image?repo=axkr/symja_android_library>
| MIT License |
SnuggleTeX (vendored in matheclipse-external) | LaTeX to MathML conversion | BSD License |
fastutil (slim fork vendored in matheclipse-external) | primitive type collections | Apache License 2.0 |