Download, installation and unit tests

Download jar-files or clone repository

Installation

Unit tests with JUnit

Documentation

Usage with the Eclipse IDE

The JAS source distribution can also be compiled and used from the Eclipse integrated development environment.

Instructions to install the JAS source:

  1. Download the JAS source jar and unpack to some directory
  2. Download the Log4j and the Junit jar files
  3. Start eclipse
  4. Create a new project from "existing source"
  5. Specify the plain source directory /src from 1.
  6. Add the jars from 2. to the project libraries as "external JARs"
  7. Create a new project or use your default project
  8. In the project properties add as "required project" the JAS project from 4.

Instructions to install the JAS binary:

  1. Download the JAS binary jar file
  2. Download the Log4j and the Junit jar files
  3. Start eclipse
  4. In your projects properties add the jar files from 1. and 2. to the project libraries as "external JARs"

Create and edit a sample java programm which uses the JAS API. E.g. the following sample computes the first ten Legendre polynomials.

import java.util.List;
import java.util.ArrayList;

import edu.jas.arith.BigRational;
import edu.jas.poly.GenPolynomial;
import edu.jas.poly.GenPolynomialRing;

public class mytests {

    public static void main(String[] args) {
         BigRational fac = new BigRational();
         String[] var = new String[]{ "x" };
         GenPolynomialRing<BigRational> ring
             = new GenPolynomialRing<BigRational>(fac,1,var);

         int n = 10;
         List<GenPolynomial<BigRational>> P 
             = new ArrayList<GenPolynomial<BigRational>>(n);
         GenPolynomial<BigRational> t, one, x, xc;
         BigRational n21, nn;

         one = ring.getONE();
         x   = ring.univariate(0);

         P.add( one );
         P.add( x );
         for ( int i = 2; i < n; i++ ) {
             n21 = new BigRational( 2*i-1 );
             xc = x.multiply( n21 );
             t = xc.multiply( P.get(i-1) );  // (2n-1) x P[n-1]
             nn = new BigRational( i-1 );
             xc = P.get(i-2).multiply( nn ); // (n-1) P[n-2]
             t = t.subtract( xc );
             nn = new BigRational(1,i);      
             t = t.multiply( nn );           // 1/n t
             P.add( t );
         }
         for ( int i = 0; i < n; i++ ) {
             System.out.println("P["+i+"] = " + P.get(i) );
         }
    }
}

Using the Jython interpreter

Using the JRuby interpreter

Using the Ruboto-IRB-JAS Android application


Heinz Kredel

Last modified: Sat Aug 16 09:30:44 CEST 2014