Extensions - Overview

The Jep Extensions offer a number of additional features to the standard Jep package. These fall in a few broad areas: fast evaluation, symbolic manipulation, differentiation, a type system, vectors and matrices and MathmML conversion.

Field Type System

The com.singularsys.extensions.field package provides a type system for Jep. This allows custom datatypes such as Rational Numbers to be easily added to the Jep system.

The com.singularsys.extensions.matrix package adds to this system allowing various matrix implementations to be used.

Package: com.singularsys.extensions.field
Package: com.singularsys.extensions.matrix

Fast Evaluation

Two packages offer fast evaluation the com.singularsys.extensions.fastreal is optimized for simple expressions involving scaler expressions, whilst the other com.singularsys.extensions.fastmatrix is for expressions working with vectors and matrices.

Both work by compiling the expression to an efficient reverse-polish notation and using a special evaluation routine. The typically offer between a 4 and 10 fold speedup over the normal evaluation.

These discussed in the fastreal and fastmatrix documentation pages.

Fast Evaluation (Reals)
Package: com.singularsys.extensions.fastreal
Fast Evaluation (Matrices)
Package: com.singularsys.extensions.fastmatrix

Symbolic operations and differentiation

Several packages allow symbolic manipulation of Jep expressions. These can be used to clean up expressions, expand expression, convert them to polynomials, and perform symbolic differentiation. There is a facility to allow custom rewriting rules to be implemented.

Expression Cleaner
Removes redundant parts of expressions which cleans up expressions like 2.0*x^1.0*1.0+0.0 to produce 2.0*x
Documentation: Expression Cleaner
Javadoc: com.singularsys.extensions.xjep.ExpressionCleaner
Conversion to polynomials; advanced simplification and comparison of expressions. Extraction of polynomial coefficients.
Documentation: Polynomials
Package: com.singularsys.extensions.polynomials
Several utilities for symbolic operations. Include the XJep sub class of Jep with methods for simplification and substitution, and a pre-processing stage for symbolic manipulation of expressions before evaluation. Variables in XJep can have an associated expression.
Documentation: XJep
Package: com.singularsys.extensions.xjep
equations can be differentiated, these can be specified either programmatically or in the equations themselves.
Documentation: Differentiation
Package: com.singularsys.extensions.djep
Performs symbolic rewriting operations, allows for advanced simplification rules to be specified.
Documentation: Rewrite
Package: com.singularsys.extensions.rewrite

Expanded syntactical features

Structured programming
Support for structured programming constructs like for, while and if.
Documentation: Structured programming
Package: com.singularsys.extensions.structure
Lambda functions
Anonymous lambda functions x=>x^2 and higher order functions map(x=>x^2,[1..10]).
Documentation: Lambda Functions
Package: com.singularsys.extensions.lambda


Conversion to/from the Content-MathML mathematical markup language.

Documentation: MathML
Package: com.singularsys.extensions.mathml


Includes a range of statistical functions, Mean, Median, and some basic distributions, Binomial, and Normal.

Documentation: Statistical
Packages: com.singularsys.extensions.statistical
Distributions: com.singularsys.extensions.statistical.distributions