create varX = new Variable.Local<Rational>("x");

M

Mohamad Khaleghy

Hi
I have sample code downloaded for using jscience.

But when I use it, it gives this message:

E/AndroidRuntime(1296): java.lang.NoClassDefFoundError:eek:rg.jscience.mathematics.function.Variable$Local

Am i I missing something? Of course I imported the jscience jar lib to my project. But still can't figure this out.

Variable.Local<Rational> varX = new Variable.Local<Rational>("x");
Variable.Local<Rational> varY = new Variable.Local<Rational>("y");

// f(x, y) = x² + x·y + 1;
Polynomial<Rational> x = Polynomial.valueOf(Rational.ONE, varX);
Polynomial<Rational> y = Polynomial.valueOf(Rational.ONE, varY);
Polynomial<Rational> fx_y = x.pow(2).plus(x.times(y)).plus(Rational.ONE);
System.out.println("f(x,y) = " + fx_y);

// Evaluates f(1,0)
System.out.println("f(1,0) = " + fx_y.evaluate(Rational.ONE, Rational..ZERO));

// Calculates df(x,y)/dx
System.out.println("df(x,y)/dx = " + fx_y.differentiate(varX));
 
J

Joerg Meier

Am i I missing something? Of course I imported the jscience jar lib to my project. But still can't figure this out.

Importing it lets you compile. Are you also making sure that they get
exported into the final apk ?

Liebe Gruesse,
Joerg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top