Groovy Science is a symbolic manipulation library for Groovy that is intended to be easy to "glue" to existing scientific Java (and Groovy) libraries.
There are no archive releases of Groovy Science yet, but the current source can be found at http://svn.codehaus.org/groovy-contrib/science/. To use it, you can do any of the following things:
Groovy Science has been successfully built and used under Java 1.6.0 Update 7 and Groovy 1.5.1.
The centerpiece of the library is the SymbolicExpression class. A SymbolicExpression is a representation of the "application" of an operator object to a list of other SymbolicExpressions. This makes for a simple tree structure, and it is not unlike the way Lisp code is represented in s-expressions.
The SymbolicExpression class overloads almost all of the operators that can be overloaded in Groovy. So, instead of building all expressions using expr, you can sometimes take advantage of Groovy's own syntax:
If you wanted to represent an expression like "1 + 1", you could do so as follows:
If you do that, though, you might run the risk of confusing your constants with your other operators. To help keep your constants clearly identified, you can use the ConstantOperator class:
Please contact the team members by e-mail.
Groovy Science can take a lot of different directions. Here are some of the bigger sub-projects it might encompass:
In case you don't have a big idea like that or a lot of time to do it in, here are some of the more menial things that could still really help: